Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
fix: Show empty state instead of No results when default view hides all rows
…unt-ids # Conflicts: # src/libs/actions/OnyxDerived/configs/guideAccountIDs.ts # src/pages/inbox/report/withReportOrNotFound.tsx # tests/unit/OnyxDerived/guideAccountIDsTest.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
This targets the Onyx store bump in Expensify#98956.
GUIDE_ACCOUNT_IDSis computed by OnyxDerived from one key,PERSONAL_DETAILS_LIST. The engine runs outside React, writes the result back into Onyx and to disk, and on Onyx 3.0.117 every write hands consumers a new array, even when the list of guides is the same. Every screen that reads the key then re-renders.This replaces the derived value with a
useOnyxselector over the personal details list. The selector keeps the config's sort, so an unrelated personal-details write selects a deep-equal array anduseOnyxkeeps the old reference. Consumers read it through a newuseGuideAccountIDshook, which uses the live personal details list (not the Search snapshot), like the derived value did. The config, its key and its type are removed. The persisted row is left on disk, as with theTODOSremoval.A new reassure test runs unchanged on the base and on this branch. With 4 report screens mounted and 10 renames of a non-guide user, the screens go from 11 renders (4.3 ms) to 1 render (0.6 ms). The whole write loop over a 5,000-person list, with the LHN and the screens mounted, goes from 429 ms to 400 ms. So running the selector in each consumer costs less than the engine's single compute and write. The LHN render count doesn't change yet: on this base
REPORT_ATTRIBUTESalso changes reference on every personal-details write, and that alone makes the LHN re-check every report.Fixed Issues
$ https://github.com/callstack-internal/expensify-issues/issues/3074
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari