Fix: Add more space to bottom docked button#44761
Fix: Add more space to bottom docked button#44761puneetlath merged 17 commits intoExpensify:mainfrom
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
@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] |
This comment has been minimized.
This comment has been minimized.
Screen.Recording.2024-07-03.at.15.59.10.mov |
I think we should add the padding there for consistency. And we should check as many other pages as we can too to make sure we aren't missing any.
Much better! |
src/components/Form/FormWrapper.tsx
Outdated
| useEffect(() => { | ||
| const keyboardWillShowListener = Keyboard.addListener('keyboardWillShow', () => { |
There was a problem hiding this comment.
What does this useEffect do exactly?
|
@allgandalf I updated PR. Now, I use the additional padding bottom style in
|
|
I will review this today |
allgandalf
left a comment
There was a problem hiding this comment.
also are we covering all the cases with these changes?
Yes |
|
|
||
| const useExtraSafePaddingBottomStyle = () => { | ||
| const styles = useThemeStyles(); | ||
| const [willKeyboardShow, setWillKeyboardShow] = useState(false); |
There was a problem hiding this comment.
Can you typecast the boolean type of the variable and also rename the variable to something more readable like:
isKeyboardVisible?
There was a problem hiding this comment.
I added the type for it. But I don't think we should rename the state, because as I mentioned above, willKeyboardShow is used to fix the issue didKeyboardShow encountered: There is a delay when the keyboard is visible by the user and the when didKeyboardShow is set to true. So it is not just isKeyboardVisible.
|
Yeah, that looks better. Can you help me understand why the two of them are different though? |
We use App/src/pages/OnboardingPersonalDetails/BaseOnboardingPersonalDetails.tsx Lines 140 to 145 in 0d70442 And screenwrapper for the display name page: App/src/pages/settings/Profile/DisplayNamePage.tsx Lines 72 to 77 in 0d70442 |
allgandalf
left a comment
There was a problem hiding this comment.
changes LGTM, looks good to be merged into staging
|
Got it. Yeah, ideally we use whatever is consistent with other places (like display name). How do you recommend we fix that? |
Use screenwrapper instead of |
|
Sounds good! |
|
@Expensify/design someone mind reviewing as well? |
|
Oh whoops, my bad. I see @shawnborton already reviewed above. |
|
@puneetlath I addressed your comment above |
puneetlath
left a comment
There was a problem hiding this comment.
Sorry a couple more small requests.
| import useStyledSafeAreaInsets from './useStyledSafeAreaInsets'; | ||
| import useThemeStyles from './useThemeStyles'; | ||
|
|
||
| const useSafePaddingBottomStyle = () => { |
There was a problem hiding this comment.
Can we add some general documentation above about what this hook is for.
There was a problem hiding this comment.
Sorry for being a stickler, but I'm finding this comment a bit hard to follow. In the future, when should someone use this hook? Maybe if you can just explain that to me in words in a comment here, I can help you craft a code comment that is a bit more clear.
There was a problem hiding this comment.
agree with you @puneetlath , @truph01 can you please follow up with this
There was a problem hiding this comment.
In the future, when should someone use this hook
This hook, useSafePaddingBottomStyle, is useful for adding extra bottom padding to a component based on the device's safe area. If the device's safe area padding bottom is 0, the hook returns 0. Otherwise, it provides a padding bottom of 20. Use this to ensure content visibility and layout consistency across different devices.
There was a problem hiding this comment.
That's beautiful. Very clear! Let's make that the comment.
|
All comment are resolved |
| import useStyledSafeAreaInsets from './useStyledSafeAreaInsets'; | ||
| import useThemeStyles from './useThemeStyles'; | ||
|
|
||
| const useSafePaddingBottomStyle = () => { |
There was a problem hiding this comment.
Sorry for being a stickler, but I'm finding this comment a bit hard to follow. In the future, when should someone use this hook? Maybe if you can just explain that to me in words in a comment here, I can help you craft a code comment that is a bit more clear.
Co-authored-by: Puneet Lath <puneet@expensify.com>
|
I updated PR @puneetlath |
|
✋ 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/puneetlath in version: 9.0.13-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.13-4 🚀
|


Details
Fixed Issues
$ #44056
PROPOSAL: #44056 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop