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 |
45 tasks
fix: Show empty state instead of No results when default view hides all rows
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 and builds on the unmerged
useOnyxStatefrom the Onyx store work.NON_PERSONAL_AND_WORKSPACE_CARD_LISTis computed by OnyxDerived fromCARD_LISTand everyWORKSPACE_CARDS_LISTfeed. The engine runs outside React and writes the merged list back into Onyx and to disk on every write to either key. With a large card list, that write is the expensive part: on the base, each card write re-persists the whole merged list even when its content is the same.This replaces the derived value with a
useNonPersonalAndWorkspaceCardListhook onuseOnyxStateover the same two keys. The merge is the samemergeCardListWithWorkspaceFeedscall with personal cards filtered out. It is memoized on the pair of inputs, so it runs once per write however many consumers are mounted, and a merge with the same content returns the previous object. The hook also keeps each selector's output per merged list, so a write that leaves the list unchanged doesn't make consumers rescan it. Neither key is redirected to the Search snapshot, so Search keeps reading live data. All 11 consumers use the hook. 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 3 expense views and the Search and Home card surfaces mounted. Render counts are the same in every scenario. With 9,000 cards, 10 writes that leave the merged list unchanged go from 1,320 ms to 527 ms for the whole write loop, and 10 renames of a company card go from 1,368 ms to 694 ms. With a small list, the times are within noise.
Fixed Issues
$ https://github.com/callstack-internal/expensify-issues/issues/3078
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