Skip to content

fix: ENG-6379 - code-app-env - DataView perf #2866

Open
UncleClapton wants to merge 13 commits into
brandingbrand:developfrom
UncleClapton:fix/ENG-6379
Open

fix: ENG-6379 - code-app-env - DataView perf #2866
UncleClapton wants to merge 13 commits into
brandingbrand:developfrom
UncleClapton:fix/ENG-6379

Conversation

@UncleClapton

@UncleClapton UncleClapton commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Describe your changes

The following changes have been made to code-app-env:

  • Features
    • CodeBlocks now display Line numbers for easier reference
      • This started as a way to consistently measure the dimensions of the text content for optimizing the flatlist, but the same measurement can be used to consistently size a gutter for line numbers, so I added this in.
    • DataViews can now parse deeply nested JSON strings within provided data. This is optional, and controllable via prop.
      • The prime motivator for this feature is to address display issues with large stringified JSON datasets saved in AsyncStorage. These have been causing display issues in the data viewer, and leading to no data rendered. By parsing these JSON strings, we mat split an otherwise truncated dataset into viewable data.
    • DataView actions may now be disabled via disabled option.
    • AsyncStorageDevScreen and SensitiveInfoDevScreen have been abstracted to a common DataViewerDevScreen which provides an easy way to define data viewer screens for other libraries, such as react-native-keychain.
    • AsyncStorageDevScreen now accepts new options, and a generator function has been created to bind these props to the screen.
      • parseValues - under the hood, enables deepParse for the data view. Practically, enables parsing of AsyncStorage values that are detected to be objects or arrays
      • displayKeyFilter - Controls which keys may be displayed in the data viewer. This provides a final fallback solution in the event the app has a key/value pair that either breaks the screen, or just shouldn't be displayed outright.
      • clearKeyFilter - Controls which keys may be cleared when cleared via CTA. Mainly provided for completeness sake with displayKeyFilter. I didn't want to have one prop that affects both.
  • Fixes
    • Resolve Perf issues within CodeBlock displaying massive text strings. instead, we split content into text lines which are individually rendered in an optimized FlatList.
    • Fix display of multiple action CTAs in DataView.

Issue ticket number and link

ENG-6379

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Test Plan

  1. Open Example App
  2. Open Dev Menu
  3. Confirm AsyncStorage, "Example Custom Screen", and "Example Generic Data Viewer Screen" all display as expected.
    • Note: the "Example Custom Screen" contains a CTA which can set example data in AsyncStorage.

Checklist before requesting a review

  • A self-review of my code has been completed
  • Tests have been added / updated if required
  • Documentation has been updated to reflect these changes

@UncleClapton UncleClapton changed the title fix: ENG-6379 fix: ENG-6379 - code-app-env - DataView perf Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant