-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$250] Expense - Submit button is missing after switching layout from mobile to web #52883
Comments
Triggered auto assignment to @greg-schroeder ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Submit button is missing after switching layout from mobile to web What is the root cause of that problem?This bug occurs because isWindowHeightReducedByKeyboard is set to true and it is preventing the button from rendering
When switching the layout from web to mobile (reducing the window height), we toggle isWindowHeightReducedByKeyboard to true App/src/hooks/useIsWindowHeightReducedByKeyboard/index.ts Lines 27 to 28 in 0029614
However, when switching the layout from mobile to web, we do not reset isWindowHeightReducedByKeyboard to false What changes do you think we should make in order to solve the problem?We should only set isWindowHeightReducedByKeyboard to true if a keyboard is available on the device.
We should include canUseTouchScreen condition.
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Submit button is missing after switching layout from mobile to web What is the root cause of that problem?The submit button is missing because the footer content is not rendered due to a condition that causes an early return, preventing the submit button from being rendered. This happens because App/src/components/MoneyRequestConfirmationList.tsx Lines 825 to 827 in 937064c
When we open the developer tools and switch to the mobile layout,
After switching to the desktop layout, App/src/hooks/useIsWindowHeightReducedByKeyboard/index.ts Lines 11 to 19 in 9c4e662
What changes do you think we should make in order to solve the problem?To resolve this issue, we should reset App/src/hooks/useIsWindowHeightReducedByKeyboard/index.ts Lines 11 to 19 in 9c4e662
to const toggleKeyboardOnSmallScreens = useCallback(
(isKBOpen: boolean) => {
if (!shouldUseNarrowLayout) {
+ if (!isSmallScreenWidth && isWindowHeightReducedByKeyboard) {
+ setIsWindowHeightReducedByKeyboard(false);
+ }
return;
}
setIsWindowHeightReducedByKeyboard(isKBOpen);
},
[shouldUseNarrowLayout],
); POCWhat alternative solutions did you explore? (Optional)We can update the condition in the footer content to return when App/src/components/MoneyRequestConfirmationList.tsx Lines 825 to 827 in 937064c
to - if (isReadOnly || isKeyboardShown || isWindowHeightReducedByKeyboard) {
+ if (isReadOnly || isKeyboardShown || (isSmallScreenWidth && isWindowHeightReducedByKeyboard)) {
return;
} |
Job added to Upwork: https://www.upwork.com/jobs/~021859734598640577777 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt ( |
Triggered auto assignment to @aldo-expensify ( |
💬 A slack conversation has been started in #expensify-open-source |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
It says this is also reproducible on production, so wouldn't it be a different issue? |
Ah wait nvm, that PR has been on prod for a while |
@thienlnam I'll assign you here since you are investigating and have a fix. 🙇 |
Revert PR is merged. Let's close this one |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.65-1
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
Submit button will be shown.
Actual Result:
Submit button is missing on confirmation page after switching layout from mobile to web.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6671472_1732169889618.20241121_141701.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @s77rtThe text was updated successfully, but these errors were encountered: