Skip to content
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

[$1000] mweb/Safari - Workspace - Invite button in invite message page hides behind keyboard #33548

Closed
2 of 6 tasks
lanitochka17 opened this issue Dec 23, 2023 · 75 comments
Closed
2 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Internal Requires API changes or must be handled by Expensify staff

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 23, 2023

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: 1.4.16-4
Reproducible in staging?: Y
Reproducible in production?: Y
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Go to Settings > Workspaces > any workspace
  2. Go to Members > Invite
  3. Select any member > Next
  4. Focus on the invite message field

Expected Result:

The Invite button will move above the keyboard

Actual Result:

The Invite button is hidden behind the keyboard. In order to show the invite button while keyboard is open, user has to scroll down the page

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6324978_1703346993790.RPReplay_Final1703346401.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014e381cef3b4dde0b
  • Upwork Job ID: 1738596942038294528
  • Last Price Increase: 2024-02-19
  • Automatic offers:
    • situchan | Contributor | 28078003
    • paultsimura | Contributor | 28107877
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 23, 2023
@melvin-bot melvin-bot bot changed the title mweb/Safari - Workspace - Invite button in invite message page hides behind keyboard [$500] mweb/Safari - Workspace - Invite button in invite message page hides behind keyboard Dec 23, 2023
Copy link

melvin-bot bot commented Dec 23, 2023

Job added to Upwork: https://www.upwork.com/jobs/~014e381cef3b4dde0b

Copy link

melvin-bot bot commented Dec 23, 2023

Triggered auto assignment to @anmurali (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 23, 2023
Copy link

melvin-bot bot commented Dec 23, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 23, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (External)

@paultsimura
Copy link
Contributor

paultsimura commented Dec 23, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

The "Invite" button hides behind the keyboard.

What is the root cause of that problem?

The system keyboard visibility is not handled properly on the WorkspaceInviteMessagePage.

What changes do you think we should make in order to solve the problem?

We should add the shouldEnableMaxHeight property to the ScreenWrapper here:

<ScreenWrapper
includeSafeAreaPaddingBottom={false}
testID={WorkspaceInviteMessagePage.displayName}
>

What alternative solutions did you explore? (Optional)

@aim-salam
Copy link

aim-salam commented Dec 25, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Invite button in invite message page (Workspace) should appear on top keyboard, not hide behind keyboard.
( mweb/Safari - Workspace - Invite button in invite message page hides behind keyboard )

What is the root cause of that problem?

=> WorkspaceInviteMessagePage.js

shouldEnableMaxHeight is not set to true in ScreenWrapper's component.

What changes do you think we should make in order to solve the problem?

=> WorkspaceInviteMessagePage.js

Just add shouldEnableMaxHeight as true to ScreenWrapper's prop.

Screenshot 2023-12-25 at 10 05 06 AM

Screenshot 2023-12-25 at 10 02 45 AM

What alternative solutions did you explore? (Optional)

@tienifr
Copy link
Contributor

tienifr commented Dec 25, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

The Invite button is hidden behind the keyboard. In order to show the invite button while keyboard is open, user has to scroll down the page

What is the root cause of that problem?

We have 2 problems here:

  1. The invite button is behind keyboard
    We did not enable shouldEnableMaxHeight in WorkspaceInvitePage, so the maxHeight is undefined -> the invite button can't be shown
  2. The header disappear
    We did not set marginTop for ScreenWrapper

What changes do you think we should make in order to solve the problem?

  1. Enable shouldEnableMaxHeight
  2. subscribe withViewportOffsetTop and add style={[{marginTop: props.viewportOffsetTop}]} in ScreenWrapper like what we did in ReportScreen
        <ScreenWrapper
            includeSafeAreaPaddingBottom={false}
            testID={WorkspaceInviteMessagePage.displayName}
            shouldEnableMaxHeight
            style={[{marginTop: props.viewportOffsetTop}]}
        >

What alternative solutions did you explore? (Optional)

NA

We can subscribe withViewportOffsetTop in ScreenWrapper and add the new flag (shouldUseViewportOffsetTop) to enable [{marginTop: props.viewportOffsetTop}] to its style

Result

Screen.Recording.2023-12-25.at.17.59.18.mov

@Santhosh-Sellavel
Copy link
Collaborator

@anmurali Unassigning this one due to low bandwidth please assign a new C+ here, thanks!

@Santhosh-Sellavel Santhosh-Sellavel removed their assignment Dec 26, 2023
@situchan
Copy link
Contributor

I can take over

@melvin-bot melvin-bot bot added the Overdue label Dec 29, 2023
Copy link

melvin-bot bot commented Dec 30, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Jan 1, 2024

@anmurali Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Jan 2, 2024

@anmurali 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 2, 2024
Copy link

melvin-bot bot commented Jan 2, 2024

📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot removed the Overdue label Jan 2, 2024
@anmurali
Copy link

anmurali commented Jan 2, 2024

@situchan assigned to you. Can you review the proposals and pick one?

@melvin-bot melvin-bot bot added the Overdue label Jan 5, 2024
Copy link

melvin-bot bot commented Jan 6, 2024

@anmurali @situchan this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@situchan
Copy link
Contributor

situchan commented Jan 8, 2024

All proposed to enable shouldEnableMaxHeight. I am checking if this doesn't cause any side effect.

@anmurali
Copy link

anmurali commented Mar 7, 2024

Discussing the proposal, not overdue.

@melvin-bot melvin-bot bot removed the Overdue label Mar 7, 2024
@suneox
Copy link
Contributor

suneox commented Mar 7, 2024

I have a demo structure for this concern before apply into code, we need change a current form structure and virtual viewport when focusing

trim.A681236E-F791-49E0-828B-F3BCE1FBE4C6.MOV

@puneetlath puneetlath removed their assignment Mar 7, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 11, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

@madmax330, @anmurali, @situchan Eep! 4 days overdue now. Issues have feelings too...

@madmax330
Copy link
Contributor

madmax330 commented Mar 13, 2024

@shawnborton @situchan thoughts on the above?

@melvin-bot melvin-bot bot removed the Overdue label Mar 13, 2024
@shawnborton
Copy link
Contributor

Hmm this might be on purpose though since the invite message could potentially be quite long? Basically I think we did that to prevent having a moving/growing text input potentially grow to be below the fixed submit button. So I'm actually not sure if this is a bug, it might be intended behavior and thus we could close it out.

@shawnborton
Copy link
Contributor

Curious if @Expensify/design has an opinion though. I think we don't have a bulletproof approach for these kinds of bottom-of-the-view buttons.

I had long advocated for a system where if there is enough vertical space, the button stays in view docked to the bottom of the screen. But if the content above the button became long, it would push the button down and out of view. I think we did implement this kind of thing correctly on some of the profile details pages (like your display name), but not sure if that works well everywhere else.

@dannymcclain
Copy link
Contributor

@shawnborton I'm not sure I have much to add here—bottom-docked and then anchored to the top of keyboard feels pretty standard for buttons like this, but I'm honestly having a little trouble following this thread.

@shawnborton
Copy link
Contributor

All good! I guess my thinking is that when we anchor a big button to the top of the keyboard, we don't really give the user too much space to scroll in their viewport. Then if we add a scrollable/growing element in that remaining small space - in this case, it's a textarea that grows with a long invite message - I feel like we kinda set the user up for a tricky UI to interact with.

That being said, you could argue that keeping the button fixed to the keyboard makes it so that you don't have to worry about awkward scroll issues to be able to submit.

@dannymcclain
Copy link
Contributor

Ahh I see what you're saying!

Now I understand and agree with your comment here:

if there is enough vertical space, the button stays in view docked to the bottom of the screen. But if the content above the button became long, it would push the button down and out of view

If we implemented behavior like that, couldn't we also update the keyboard "go" button (I don't know what it's called, I'll point it out in a screenshot) to reflect whatever action is in the big green button (that would in this case be out of view)?

Screenshot 2024-03-13 at 9 57 08 AM

@shawnborton
Copy link
Contributor

If we implemented behavior like that, couldn't we also update the keyboard "go" button (I don't know what it's called, I'll point it out in a screenshot) to reflect whatever action is in the big green button (that would in this case be out of view)?

Yes! Big fan of that.

Copy link

melvin-bot bot commented Mar 18, 2024

@madmax330, @anmurali, @situchan Eep! 4 days overdue now. Issues have feelings too...

@anmurali
Copy link

Are we fixing this in #35380 @situchan? Or vice versa?

@melvin-bot melvin-bot bot removed the Overdue label Mar 18, 2024
@situchan
Copy link
Contributor

Are we fixing this in #35380 @situchan? Or vice versa?

No, it's different issue

@situchan
Copy link
Contributor

What's the next step here?
Do nothing or something to fix?

@melvin-bot melvin-bot bot added the Overdue label Mar 25, 2024
@wildan-m
Copy link
Contributor

wildan-m commented Mar 27, 2024

@situchan @paultsimura I am unable to replicate the bug mentioned here with the latest main version. I believe adding shouldEnableMaxHeight alone should work fine.

Kapture.2024-03-27.at.09.21.57.mp4

@suneox
Copy link
Contributor

suneox commented Mar 27, 2024

On my proposal also explain why before this PR merge shouldEnableMaxHeight doesn't work. Currently, the page structure also updated so we don't need to trigger scrollIntoView after resetScrollPositionOnVisualViewport

Based on the latest structure we should update submitButtonStyles for WorkspaceInviteMessagePage at FormProvider instead of trigger scrollIntoView after resetScrollPositionOnVisualViewport to avoid the bottom action button hidden by the keyboard on small screen devices look like the POC

So i would like to update proposal based on the latest code structure

Proposal

Please re-state the problem that we are trying to solve in this issue.

mweb/Safari - Workspace - Invite button in invite message page hides behind keyboard

What is the root cause of that problem?

WorkspaceInviteMessagePage doesn't set shouldEnableMaxHeight and the submit button at FormProvider doesn't have a correct style

What changes do you think we should make in order to solve the problem?

Add shouldEnableMaxHeight to WorkspaceInviteMessagePage and add submitButtonStyles into FormProvider to make sure works on small screen devices

<ScreenWrapper
            includeSafeAreaPaddingBottom={false}
            testID={WorkspaceInviteMessagePage.displayName}
+           shouldEnableMaxHeight
        >

Update style of FormProvider at this line to

    <FormProvider
        style={[styles.flexGrow1, styles.ph5]}
+       submitButtonStyles={{marginTop: 0}}
Without submitButtonStyles With submitButtonStyles
Screenshot 2024-03-27 at 13 58 55 Screenshot 2024-03-27 at 13 58 03

What alternative solutions did you explore? (Optional)

If we want the bottom always snap to bottom and change the scroll behavior look like this comment (only scroll on middle content, skip header and footer) we will change the FormWrapper structure

@situchan
Copy link
Contributor

@suneox thanks for the proposal but I wonder if this issue should just be closed as "do nothing" based on feedback from @Expensify/design.

@madmax330 what do you suggest?

@melvin-bot melvin-bot bot removed the Overdue label Mar 28, 2024
@madmax330
Copy link
Contributor

Yeah I think we should just close

@melvin-bot melvin-bot bot added the Overdue label Apr 1, 2024
@melvin-bot melvin-bot bot removed the Overdue label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Internal Requires API changes or must be handled by Expensify staff
Projects
No open projects
Development

No branches or pull requests