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

[HOLD for payment 2023-12-26] [$1000] mWeb - Composer - Unnecessary blank area is created when scrolling down while keyboard is open #19642

Closed
1 of 6 tasks
kbecciv opened this issue May 26, 2023 · 107 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented May 26, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open the testing link https://staging.new.expensify.com/
  2. Open any chat
  3. Write multiline text in the composer until the enlarge composer icon appear (keep the keyboard open)
  4. Tap on the maximize composer icon
  5. Above the keyboard, scroll down

Expected Result:

The bottom of the screen should stick to the bottom of the input composer, and no extra blank area should be created when the user scrolls down on the screen

Actual Result:

When scrolling down while the composer is maximized, an excessively wide area is created below the composer, resulting in continuous resizing of the composer when scrolling both upward and downward

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.18.0

Reproducible in staging?: yes

Reproducible in production?: Yes - but the composer does not keep resizing, only the blank area is presented

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://platform.applause.com/services/links/v1/external/8e4abb883a4188a43758f0561fbfd5c7900892adaded42ecb9fb365ac7c0b0a3

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01302d5f678fb0c5f7
  • Upwork Job ID: 1662142490327298048
  • Last Price Increase: 2023-05-26
  • Automatic offers:
    • suneox | Contributor | 28039355
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 26, 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

@abekkala abekkala added the External Added to denote the issue can be worked on by a contributor label May 26, 2023
@melvin-bot melvin-bot bot changed the title mWeb - Composer - Unnecessary blank area is created when scrolling down while keyboard is open [$1000] mWeb - Composer - Unnecessary blank area is created when scrolling down while keyboard is open May 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01302d5f678fb0c5f7

@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

Current assignee @abekkala is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

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

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

melvin-bot bot commented May 26, 2023

Triggered auto assignment to @thienlnam (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot added the Overdue label May 29, 2023
@mountiny
Copy link
Contributor

We can export this to Callstack

@lukemorawski
Copy link
Contributor

here I am

@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

📣 @lukemorawski! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

📣 @lukemorawski You have been assigned to this job by @mountiny!
Please apply to this job in Upwork 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 📖

@qasimkhan23
Copy link

qasimkhan23 commented May 29, 2023

Proposal

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

When scrolling down while the composer is maximized, an excessively wide area is created below the composer, resulting in continuous resizing of the composer when scrolling both upward and downward.

What is the root cause of that problem?

We have added the marginTop property in screenWrapperStyle and we are providing the value to it from viewportOffsetTop which is causing the marginTop value to fluctuate when a user drag the screen in IOS Safari browser, and the View which contains the chat has given the property flex:1 because of that the Inner View adjusts its size and the composer looks resizing continuously.

const screenWrapperStyle = [styles.appContent, styles.flex1, {marginTop: this.props.viewportOffsetTop}];

before
Screenshot 2023-05-29 at 4 01 20 PM
you can see below, how the top of the page got cut when I scroll the page down, when I scroll the page down the offset value is provided in a negative number which results in cutting the top part of the page because of marginTop: negativeValue
Screenshot 2023-05-29 at 4 11 41 PM

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

There is no need to add viewportOffsetTop because we have already provided flex:1 to wrapper which will take care of the screen on different devices.
after applying the solution
Screenshot 2023-05-29 at 4 04 56 PM
Screenshot 2023-05-29 at 4 17 43 PM

  const screenWrapperStyle = [styles.appContent, styles.flex1];

What alternative solutions did you explore? (Optional)

None

@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

@abekkala, @thienlnam, @Santhosh-Sellavel, @lukemorawski Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@Santhosh-Sellavel
Copy link
Collaborator

This is picked by call stack waiting for @lukemorawski

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 29, 2023
@lukemorawski
Copy link
Contributor

Working on a solution. Already have one but investigating a more comprehensive one.

@lukemorawski
Copy link
Contributor

Still working on a more robust solution. Will have more info today.

@lukemorawski
Copy link
Contributor

After some trial and error I can say that preventing scrolling of the whole window when the user activates the virtual keyboard is not achievable for current app UI setup. Common solutions and libraries (such as body-scroll-lock) don't seem to have an effect.
The whole thing is caused by iOS Safari rather peculiar way of dealing with a problem of obscured input elements. To prevent any input element from being hidden under the keyboard, in an eventuality when there is not enough room under that element, Safari adds some additional space at the bottom of the window. The whole problem is that this space seems to be not a part of the DOM tree. It's not added body or html height or on any other node. It's just some space under the DOM tree. This means that it's beyond control of the available CSS or JS apis. The only way to mitigate this problem is to prevent the window element from scrolling, by applying some styles to body and preventing default behaviour of the scroll event (plus some other more finesse tricks). Unfortunately due to a very deep anchoring of the scrolled div and it's layout this doesn't work.
The only way I have found is to scroll the window content back to it's optimal position after the user over scrolled it downwards.
I have a working solution but this needs to be discussed internally and now I'm delegated to an another, more important issue, so the PR will be slightly delayed.

@melvin-bot melvin-bot bot added the Weekly KSv2 label Dec 12, 2023
@JmillsExpensify
Copy link

PR up for review

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Dec 19, 2023
@melvin-bot melvin-bot bot changed the title [$1000] mWeb - Composer - Unnecessary blank area is created when scrolling down while keyboard is open [HOLD for payment 2023-12-26] [$1000] mWeb - Composer - Unnecessary blank area is created when scrolling down while keyboard is open Dec 19, 2023
Copy link

melvin-bot bot commented Dec 19, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 19, 2023
Copy link

melvin-bot bot commented Dec 19, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.13-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-12-26. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Dec 19, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
  • [@parasharrajat] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@parasharrajat] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@parasharrajat] Determine if we should create a regression test for this bug.
  • [@parasharrajat] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@parasharrajat
Copy link
Member

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR: It's a new bug not caused by any PR.
  • [@parasharrajat] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: NA
  • [@parasharrajat] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: NA
  • [@parasharrajat] Determine if we should create a regression test for this bug. Yes
  • [@parasharrajat] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Steps

mweb Safari | Android Chrome

  1. Login and open any chat
  2. Write multiline text in the composer until the Expand composer icon appears and the content is scrollable (keep the keyboard open).
  3. Toggle on the maximize composer icon
  4. Keep the keyboard open and scroll down inside the composer input.
  5. Verify content can be scrollable with multiple lines and no extra blank area when the user scrolls down.

Do you agree 👍 or 👎 ?

@parasharrajat
Copy link
Member

parasharrajat commented Dec 19, 2023

What is the regression @suneox ?

@suneox
Copy link
Contributor

suneox commented Dec 19, 2023

What is the regression @suneox ?

Ah sorry my mistake the comment above is a checklist but I think you raised regression bug. Sorry for this inconvenience

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

JmillsExpensify commented Dec 27, 2023

Hmmm, I'm a bit confused where we're at on payment. It looks like the original contributor's PR was reverted, so that leaves us with @suneox who was assigned more recently. That payment summary would be:

@melvin-bot melvin-bot bot removed the Overdue label Dec 27, 2023
@suneox
Copy link
Contributor

suneox commented Dec 28, 2023

Hi @JmillsExpensify
I have received an offer 1000$ but currently is 500$ so have we got any mistake or update?

@JmillsExpensify
Copy link

I think it's incorrect automated logic on our side. Given that you were assigned a couple of weeks ago, I think the $500 offer is correct and I can pay that amount on payout. Do you agree?

@suneox
Copy link
Contributor

suneox commented Dec 30, 2023

I have a bit confuse for the job title it still 1000$, so how can contributor get to know the actual payment? Thanks

@suneox
Copy link
Contributor

suneox commented Jan 2, 2024

Hi @JmillsExpensify
I also found another issue that has paid match with the title at this comment and the bonus program is also available for this comment, so I think this issue also applies to the payment matching with the title

and this comment

@thienlnam
Copy link
Contributor

@JmillsExpensify This bug is very old and has retained the $1000 price tag. I think since this issue predates all our pricing changes we should just pay this one out at the original price

@JmillsExpensify
Copy link

Cool, I'm not incredibly passionate. Updated the payment summary above.

@JmillsExpensify
Copy link

Contributor has been paid out and regression created. @parasharrajat Please submit a request via Expensify and we'll get your paid.

@suneox
Copy link
Contributor

suneox commented Jan 3, 2024

Thank @thienlnam @JmillsExpensify @parasharrajat I have received the payment.

@parasharrajat
Copy link
Member

Payment requested as per #19642 (comment)

@JmillsExpensify
Copy link

@laurenreidexpensify Do you mind confirming the payment summary on this issue before I approve payment?

@laurenreidexpensify
Copy link
Contributor

Payment Summary:

$1000 Contributor - @suneox payment issued in Upwork
$1000 C+ - @parasharrajat requested in newdot

@JmillsExpensify
Copy link

$1,000 approved for @parasharrajat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests