Perf/spend filters hover - #97697
Draft
sumo-slonik wants to merge 2 commits into
Draft
Conversation
…lectors Cache the wrapped snapshot selector per (selector, key) so Onyx keeps memoizing its result instead of re-running the selector over the whole collection on every render. Memoize the three remaining full passes over the personal details list (createOptionList, getValidOptions, the list data copy in UserSelector) with a comparator that walks one level into rebuilt record arguments, keep the Onyx subscriptions warm for the lifetime of the filters popover, and defer the filter content render so passing the cursor over a filter no longer mounts it.
…mand Switch the filter content of the advanced filters popover to a hover-intent delay so a filter the cursor only passes over never becomes the content key, and keep the filters that were actually shown mounted behind Activity, so returning to one is a visibility toggle instead of a rebuild of its option list. Size the option-list caches for the four user filters now that those are mounted side by side. Load the seven heaviest filter selectors on demand and warm them up when a filters popover opens, so the Search page no longer carries the option list, selection list, card, accounting and report name helpers for a user who never opens a filter. Cache the collection slices of the search snapshot per snapshot object, so the 45 collection reads on Search each walk it once between updates instead of once per subscriber. Narrow the chip subscriptions down to what each one renders: the report names of the selected reports, a dedicated context for the results error flag, and set lookups instead of scanning the selected values per entry. Sort the tag, category and currency chip values into a copy, since the array behind them comes straight out of the Onyx cache.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
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
Fixed Issues
$
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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