-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix 17664: use googleEmptyListViewHeight variable with correct value #17832
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
fix 17664: use googleEmptyListViewHeight variable with correct value #17832
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
@s77rt I think we should divide the comments in two parts like below: Inside variables.js // This is calculated based on the values specified in the 'getGoogleListViewStyle' function of the 'StyleUtils' utility
googleEmptyListViewHeight: 14,Inside AddressSearch.js onLayout={(event) => {
// We use the height of the element to determine if we should hide the border of the listView dropdown
// to prevent a lingering border when there are no address suggestions.
setDisplayListViewBorder(event.nativeEvent.layout.height > variables.googleEmptyListViewHeight);
}}
I'm also suggesting that we remove this line following our coding patterns since this is not explaining any "why" and not adding much value here
Let me know your thoughts. Thanks for reviewing on a off day! 🙏 |
|
I'm not sure if we want to remove that comment, it's not explaining the why but also not the what, it's explaining the how, Maybe we should keep it so other dev can know how to adjust the value accordingly. |
Makes sense.
Let me know your thoughts on this as well. Thanks. |
That's what I meant actually. Please apply the changes and let's discuss further code on code review comments and not on PR comments like this. |
|
@youssef-lr @0xmiroslav One of you needs to 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] |
|
@aman-atg You should have waited till we get assigned to the linked issue so pullerbear do it's job correctly 😅 |
oops! Sorry about that 😬 |
Reviewer Checklist
Screenshots/VideosWebweb.mp4Mobile Web - Chromemweb-chrome.mp4Mobile Web - Safarimweb-safari.mp4Desktopdesktop.mp4iOSios.mp4Androidandroid.mp4 |
|
@aman-atg Please double check the screenshot/video for mWeb - Safari. |
|
@aman-atg It would have helped if you tagged me again. We don't get notifications for comments reactions 😅. |
s77rt
left a comment
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.
LGTM! 🚀
cc @mountiny
mountiny
left a comment
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 everyone
|
✋ 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: 1.3.5-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.5-6 🚀
|
Details
This is a fix for the regression caused by PR.
Even when the list view is empty, it will always have some height. We hide the list view by comparing its height against a certain value (currently: 2px). However, in the previous PR, the height value was increased by adding vertical padding, but this change wasn't reflected in the comparison value. As a solution, I added a new variable named
googleEmptyListViewHeightwith the correct value of 14 pixels. This value takes into account the 2 pixels required for borders and 12 pixels for vertical padding.Fixed Issues
$ #17664
$ #17277
PROPOSAL: #17664 (comment)
Tests
Alternative Steps
Offline tests
QA Steps
Alternative Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Screen.Recording.2023-04-23.at.4.40.05.AM.mov
Mobile Web - Chrome
Screen.Recording.2023-04-23.at.2.29.38.PM.mov
Mobile Web - Safari
Screen.Recording.2023-04-24.at.11.01.31.AM.mov
Screen.Recording.2023-04-23.at.2.41.38.PM.mov
Desktop
Screen.Recording.2023-04-23.at.3.27.57.PM.mov
iOS
Screen.Recording.2023-04-23.at.2.32.30.PM.mov
Android
Screen.Recording.2023-04-23.at.2.41.38.PM.mov