Update transaction thread alignment to top styling#91862
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@codex review |
|
@ZhenjaHorbach 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] |
There was a problem hiding this comment.
Pull request overview
This PR adjusts how transaction threads (and other shouldBeAlignedToTop reports) pin content to the visual top in ReportActionsList, replacing a contentContainerStyle-based flex alignment approach that could trigger a web layout/re-render loop (React error #185).
Changes:
- Remove
justifyContent: 'flex-end'usage from the listcontentContainerStylewhenshouldBeAlignedToTop. - Apply
flex: 1viaListHeaderComponentStyle(whenshouldBeAlignedToTop) so the inverted list’s header wrapper absorbs extra space and keeps items visually top-aligned. - Ensure a header wrapper exists even when the header isn’t rendered yet by returning an empty
<View />spacer for aligned-to-top lists.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-05-27.20.00.47.movAndroid: mWeb Chrome2026-05-27.20.00.47.moviOS: HybridAppIMG_2349.MP4iOS: mWeb Safari2026-05-27.19.53.11.movMacOS: Chrome / Safari2026-05-27.19.50.54.mov |
|
LGTM! |
|
@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
Explanation of Change
For transaction threads, we previously pinned items to the visual top by applying
justifyContent: 'flex-end'to thecontentContainerStyle.On web, this caused a layout loop when content height was within a pixel of the viewport height: every layout pass repositioned items via flex → FlashList's
RecyclerView.layout()bumpedsetLayoutTreeId→ React re-rendered → another layout pass → another bump, until Reactthrew
Maximum update depth exceeded.This PR removes
justifyContent: 'flex-end'from the contentContainer and instead appliesflex: 1to FlashList'sListHeaderComponentStyle. In an inverted list the header sits at the visual bottom, so the flex-grow wrapper absorbs the space and pins items to the visual top — but the space-absorber is now a single non-virtualized View, not a layout rule on the virtualized items, which should help to escape the loop.Fixed Issues
$ #91584
PROPOSAL: N/A
Tests
Offline tests
Same, as in the Tests section.
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same, as in the Tests section.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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.mp4
Android: mWeb Chrome
android_web.mp4
iOS: Native
ios.mov
iOS: mWeb Safari
ios_web.mov
MacOS: Chrome / Safari
web.mp4