[Better Expense Previews] MoneyRequestPreview Carousel manual horizontal scrolling on web - #60174
Conversation
|
|
…-fork into Guccio163/horizontalFlatList
|
@allgandalf 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2025-04-14.at.5.35.08.PM.movAndroid: mWeb ChromeScreen.Recording.2025-04-14.at.5.34.02.PM.moviOS: NativeScreen.Recording.2025-04-14.at.5.32.47.PM.moviOS: mWeb SafariScreen.Recording.2025-04-14.at.5.33.32.PM.movMacOS: Chrome / SafariScreen.Recording.2025-04-14.at.5.30.38.PM.movMacOS: DesktopScreen.Recording.2025-04-14.at.5.33.05.PM.mov |
mountiny
left a comment
There was a problem hiding this comment.
Can you please first link the upstream issue and ideally also the upstream PR?
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.1.28-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.1.28-15 🚀
|
Explanation of Change
Current implementation of react-native-web's scroll in
FlatListdoesn't take into account FlatLists nested inside inverted FlatLists and always usepreventDefault()- that prevents nested FlatList from getting the event and scrolling. While usage ofpreventDefault()is necessary not to break scrolling, we have to add a logic to callpreventDefault()at right level to potentially reach both FlatLists.Current patch supports nested FlatLists with opposite scrolls: horizontal inside vertical and vertical inside horizontal.
Fixed Issues
$ #60180
PROPOSAL:
Tests
Open chat (private, group or workspace) on desktop web
Create at least 3 expenses (should be grouped into single report)
Expenses inside MoneyRequestReportPreview Carousel should be horizontally scrollable with the use of touchpad/mouse.
Check if chat (report actions) is still properly scrolling vertically.
Check if other usages of inverted FlatList work properly.
Offline tests
QA Steps
The same as tests.
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))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
// out of scope //
Android: mWeb Chrome
// out of scope //
iOS: Native
// out of scope //
iOS: mWeb Safari
// out of scope //
MacOS: Chrome / Safari
Screen.Recording.2025-04-14.at.11.32.37.mov
MacOS: Desktop
// out of scope //