refactor: the new-transaction highlight rail and the wide RHP width model - #98744
Conversation
…ts legacy mechanisms
…ports-newTransactionHighlight-and-RHPLayout-followups # Conflicts: # src/selectors/ReportMetaData.ts
…ports-newTransactionHighlight-and-RHPLayout-followups
…ports-newTransactionHighlight-and-RHPLayout-followups
…ports-newTransactionHighlight-and-RHPLayout-followups
…ports-newTransactionHighlight-and-RHPLayout-followups
…ports-newTransactionHighlight-and-RHPLayout-followups # Conflicts: # src/selectors/ReportMetaData.ts
…ports-newTransactionHighlight-and-RHPLayout-followups # Conflicts: # src/components/Search/index.tsx # src/libs/actions/IOU/MoneyRequestBuilder.ts # src/pages/iou/request/step/confirmation/useExpenseSubmission.ts # tests/actions/IOU/GetMoneyRequestInformationTest.ts
|
@abzokhattab Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🚀 Deployed to staging by https://github.com/blimpich in version: 9.4.75-0 🚀
|
|
🤖 No help site changes are required for this PR, so I did not create a draft docs PR. This is a refactor with no user-facing change. Nothing in WhyNo copy changed. No Nothing documented changed. The PR reworks three things, all of which the help site is silent on:
The duplicate flow itself is unchanged, so the existing steps in One pre-existing inaccuracy I noticed, unrelated to this PR. I checked the labels in the live UI on web. That predates this PR and is out of scope here. Reply with @TaduJR — since no docs changes are needed, there is no linked help site PR to review or mark view run · no recording available |
|
Deploy Blocker #100757 was identified to be related to this PR. |
|
Deploy Blocker #100761 was identified to be related to this PR. |
|
Deploy Blocker #100763 was identified to be related to this PR. |
|
Deploy Blocker #100770 was identified to be related to this PR. |
|
Deploy Blocker #100771 was identified to be related to this PR |
|
Deploy Blocker #100782 was identified to be related to this PR. |
|
Deploy Blocker #100787 was identified to be related to this PR. |
|
Deploy Blocker #100789 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Follow-up to #89585, which shipped the duplicate-expense highlight. The behaviour is the same duplicating an expense still highlights the new row and widens the panel but the code behind it is simpler and a few rough edges are fixed.
Marking a new expense. Each mark now records when it was written, so clearing an old mark can't wipe a newer one for the same expense. And only one place decides whether to write a mark, instead of two that could disagree about it.
The wide panel. Which screens show wide is now worked out from the navigation state as it renders, instead of being kept in a second copy that had to be updated by hand. That removes the two functions doing the syncing, plus an API nothing read. A panel that's closing also keeps its width until the animation finishes, rather than snapping narrow straight away.
The animation. The row appears as soon as it's added, and only the flash waits until the screen is in front so an expense added while you're looking at something else is still highlighted when you come back. A highlight now also survives the list re-sorting underneath it.
One thing worth knowing when reviewing: the stored shape of
pendingNewTransactionIDschanged. Marks written by the current production build are ignored rather than read. Nothing needs migrating old entries are cleaned up the first time they're read.Fixed Issues
$ #96327
PROPOSAL:
Tests
Read first
Setup
Re-opening a chat you already visited this session can make existing expenses flash in that chat's expense cards. That is #98308, already live in production, neither caused nor fixed here. Please don't file it against this PR, but do mention it if you see it — it can be mistaken for a failure of test 2.
1. New expenses are highlighted, and stay highlighted
2. Nothing flashes when it shouldn't
3. Bulk duplicate
4. The panel width follows the report (web/desktop, maximised)
5. The panel keeps its width while closing (web/desktop, maximised)
6. A stacked panel stays visible and clickable (web/desktop, maximised)
7. The panel survives navigation (web/desktop, maximised)
8. On mobile the highlight waits for you (iOS, Android, or a narrow browser window)
Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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-Native.mp4
Android: mWeb Chrome
iOS: Native
iOS-Native.mp4
iOS: mWeb Safari
iOS-Safari.mp4
MacOS: Chrome / Safari
Mac-Chrome.mp4