-
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
[fix]: Incorrect padding in group invite flow in RHP #42728
Conversation
@thesahindia 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] |
My builds are failing on both Android and iOS i will update then by tomorrow |
bulid on android still failing, i will test again tomorrow :) |
have pushed latest changes @thesahindia , once you complete your review we will tag Shawn to verify the styles just to be double sure that we applied the right styles |
Reviewer Checklist
Screenshots/Videos |
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!
tagging @shawnborton for one final look as you reported this issue :), you can see the result screenshots. (if my desktop and MacOS screenshots are not visible enough, please check @thesahindia 's screenshots) |
return ( | ||
<ScreenWrapper | ||
shouldEnableMaxHeight | ||
testID={InviteReportParticipantsPage.displayName} | ||
includeSafeAreaPaddingBottom={false} |
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.
Just curious, what does this do and why do we want it to be false here?
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.
This is inline with our Guidelines:
App/contributingGuides/FORMS.md
Lines 321 to 326 in 79406ff
### Safe Area Padding | |
Any `FormProvider.js` that has a button will also add safe area padding by default. If the `<FormProvider>` is inside a `<ScreenWrapper>`, we will want to disable the default safe area padding applied there e.g. | |
```jsx | |
<ScreenWrapper includeSafeAreaPaddingBottom={false}> |
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.
Addtional context:
App/src/components/ScreenWrapper.tsx
Lines 236 to 239 in 79406ff
// We always need the safe area padding bottom if we're showing the offline indicator since it is bottom-docked. | |
if (includeSafeAreaPaddingBottom || (isOffline && shouldShowOfflineIndicator)) { | |
paddingStyle.paddingBottom = paddingBottom; | |
} |
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.
Can you explain it to me like I am a child? 😄 Just to make sure I understand what it does and why we are setting it to false. Thanks!
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.
yeahhh, so we display offline indicator when the user isn't connected to internet, we want to add extra bottom padding
whenever we want to display the offline indicator, why you may ask, well we have a bottom bar for iOS, if we do not add extra padding then the offline indicator will be inline with the bottom bar, rest of the times, we do not want the extra padding to be present.
App/src/components/ScreenWrapper.tsx
Lines 236 to 239 in 79406ff
// We always need the safe area padding bottom if we're showing the offline indicator since it is bottom-docked. | |
if (includeSafeAreaPaddingBottom || (isOffline && shouldShowOfflineIndicator)) { | |
paddingStyle.paddingBottom = paddingBottom; | |
} |
But as you can see above extra bottom padding will be added if includeSafeAreaPaddingBottom
is true even when the user is online, hence we explicitly set includeSafeAreaPaddingBottom
to false
and let the extra padding come when the user is offline
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.
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.
Cool, yeah I think that helps validate that we should always be using true for iOS/Android.
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.
Cool to conforming the requirements once:
-
For Desktop/Browser: We would set
includeSafeAreaPaddingBottom
tofalse
. -
For Android Native** and iOS Native** : We would set
includeSafeAreaPaddingBottom
totrue
.
Also, as mentioned we would need to make changes throughout the codebase where ever we have used this bottom button, so should we make a new issue for this or do all those changes in this PR itself @shawnborton ?
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'm fine if we have a new issue for this one so we don't block progress on this PR.
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.
Agree on that :)
Will spin up a test build |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
Design-wise this looks good to me, just one small comment about SafeArea |
This is ready for merge @madmax330 |
✋ 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 production by https://github.com/luacmartins in version: 1.4.81-11 🚀
|
Details
This PR fixes extra padding on invite members page for group invite
Fixed Issues
$ #42594
PROPOSAL: #42594 (comment)
Tests
Same as QA
Offline tests
Same as QA
QA Steps
(This PR removed the extra padding for the button)
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop