-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[24476] Participants list is not hidden anymore on small screen devices. #26179
[24476] Participants list is not hidden anymore on small screen devices. #26179
Conversation
@eVoloshchak 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] |
@eVoloshchak There's currently a bug in the |
@@ -219,6 +224,8 @@ function BaseOptionsList({ | |||
) : null} | |||
<SectionList | |||
ref={innerRef} | |||
nestedScrollEnabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nestedScrollEnabled
is true by default on iOSnestedScrollEnabled
is false by default on Android, and it was added in API 21 which is exactly the lowest we support right now.nestedScrollEnabled
should have no effect on browsers.
Leaving it to true as default here would put both iOS and Android on the same line, and it should have no negative effect in the application for any platform. I've looked over places where this component is used, and couldn't find any new bugs/different behaviors.
@@ -200,7 +200,7 @@ function MoneyRequestAmountForm({amount, currency, isEditing, forwardedRef, onCu | |||
const buttonText = isEditing ? translate('common.save') : translate('common.next'); | |||
|
|||
return ( | |||
<> | |||
<ScrollView contentContainerStyle={styles.flexGrow1}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need contentContainerStyle={styles.flexGrow1}
because we want this page to use the whole vertically available space even if the space is larger than the page. (same behavior as seen on current staging, removing this would make the page not place the custom keyboard at the bottom of the screen).
@eVoloshchak PR should be ready to merge, bump for review 😁. |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-08-31.at.17.11.09.movMobile Web - Chromescreen-20230831-170932.mp4Mobile Web - SafariScreen.Recording.2023-08-31.at.17.03.47.movDesktopScreen.Recording.2023-08-31.at.17.12.54.moviOSScreen.Recording.2023-08-31.at.17.01.43.movAndroidScreen.Recording.2023-08-31.at.17.37.28.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and tests well
✋ 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/Gonals in version: 1.3.61-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.61-3 🚀
|
{/* | ||
* The MoneyRequestConfirmationList component uses a SectionList which uses a VirtualizedList internally. | ||
* VirtualizedList cannot be directly nested within ScrollViews of the same orientation. | ||
* To work around this, we wrap the MoneyRequestConfirmationList component with a horizontal ScrollView. | ||
*/} | ||
<ScrollView> | ||
<ScrollView | ||
horizontal | ||
contentContainerStyle={[styles.flex1, styles.flexColumn]} | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the problem or the need for the double ScrollView. The VirtualizedList does not seem to be directly nested. Can you please double checked whether this is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@s77rt It is needed because MoneyRequestConfirmationList
uses SectionList
. From the docs:
This is a convenience wrapper around VirtualizedList, and thus inherits its props (as well as those of ScrollView) that aren't explicitly listed here...
Running the app on iOS/Android will throw a runtime error and may also break up some functionality as seen in this video:
mobile.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see you are testing with a vertical ScrollView. What I meant is to use one horizontal ScrollView. Can we use that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad here. We need a vertical scrollview. Thanks for your quick responses!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, we can't. The horizontal
prop of the child ScrollView
must be removed together with the parent ScrollView
, otherwise the whole page won't be scrollable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your quick responses!
No problem! Sorry for the delay, I was out of town over the weekend and just got home. I would have replied sooner if I could, sorry again!
Details
In SplitBill, the participants list would get hidden on small screen width devices as the ScrollView was missing from the page. Added that there, and found out that it was missing from the entering amount page, so added it there too.
Fixed Issues
$ #24476
PROPOSAL: #24476 (comment)
Tests
Same as QA Steps.
Offline tests
Same as QA Steps.
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Played with resizing to very small & then to large values to make sure everything works as expected.
web.mp4
Android
In the second half of the video, I've manually duplicated the 'Date' & 'Merchant' fields twice in code in order to obtain a scrollable page.
android_native.mp4
Mobile Web - Chrome
In the first half of the video, I've tested the device in horizontal orientation, which would be an extreme case(on native for example, we don't allow device rotation) and it works fine.
android_chrome.mp4
iOS
My macOS is laggy, I've done the same tests as on android/laptop for each device, but I've only added Screenshots here.
Mobile Web - Safari
Desktop