Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.53k stars 2.88k forks source link

[HOLD for payment 2024-05-22] [$250] Login - mweb - Login screen gets off center after selecting saved credentials #40559

Closed kavimuru closed 5 months ago

kavimuru commented 6 months ago

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


Version Number: 1.4.63-0 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: n/a Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause internal team Slack conversation:

Action Performed:

precondition: user has at least 3 saved credentials

  1. Go to https://staging.new.expensify.com/

  2. Tap the email field

  3. Dismiss saved password modal

  4. Tap the email field again

  5. Swipe the credentials and select the password icon

  6. Scroll down and select the 3rd saved credential

Expected Result:

The login screen is fully visible

Actual Result:

The login screen gets off center and moves to the left

Workaround:

unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/43996225/ef2c29a4-1921-4b04-bfe5-5ecf9a45b10e

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01767f654b3e4ea3af
  • Upwork Job ID: 1781356871059267584
  • Last Price Increase: 2024-05-03
  • Automatic offers:
    • fedirjh | Reviewer | 0
    • samilabud | Contributor | 0
Issue OwnerCurrent Issue Owner: @puneetlath
melvin-bot[bot] commented 6 months ago

Triggered auto assignment to @puneetlath (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

kavimuru commented 6 months ago

@puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

kavimuru commented 6 months ago

This bug might be related to #vip-vsb

melvin-bot[bot] commented 6 months ago

Job added to Upwork: https://www.upwork.com/jobs/~01767f654b3e4ea3af

melvin-bot[bot] commented 6 months ago

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

melvin-bot[bot] commented 6 months ago

@puneetlath, @fedirjh Whoops! This issue is 2 days overdue. Let's get this updated quick!

charles-liang commented 6 months ago

@kavimuru can you provide your android and chrome version? I tried to replicate it, but it didn't occur. I run in

Chrome 113 Android 14

截屏2024-04-23 16 54 10
puneetlath commented 6 months ago

Are you able to repro @fedirjh?

fedirjh commented 6 months ago

Are you able to repro @fedirjh?

@puneetlath I can reproduce with these steps:

  1. Go to https://staging.new.expensify.com/
  2. Tap the email field
  3. Enter a very long email
  4. Double-tap the email to select it

@kavimuru Can you test with these steps and see if you can reproduce the same issue?

charles-liang commented 6 months ago

Proposal

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

Login - mweb - Login screen gets off center after selecting saved credentials

What is the root cause of that problem?

When the SVG uses absolute positioning and is either large in size or positioned such that part of it extends outside the viewport, this might lead to the appearance of scrollbars because the browser needs to provide a way for users to access and view the overflowed part.

If switch to fixed positioning, the SVG will be positioned relative to the viewport and will be independent of the rest of the document's layout or scroll. Therefore, the SVG's size or position will not affect the document's scroll behavior.

https://github.com/Expensify/App/blob/915a1b64400995032829004245d6dbf7aeeb4424/src/pages/signin/SignInPageLayout/index.tsx#L148

What changes do you th

ink we should make in order to solve the problem?

change style from absolute to fixed

Before:

截屏2024-04-24 15 27 08

After:

截屏2024-04-24 15 27 19

What alternative solutions did you explore? (Optional)

N/A

samilabud commented 6 months ago

Proposal

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

Login - mweb - Login screen gets off center when selecting all text content with dblclick

What is the root cause of that problem?

We are using an overflowHidden to wrap the SignInPageContent (The overflow: hidden CSS property on a parent component can clip any content that overflows its boundaries. This can affect how child components (like a TextInput) are displayed, especially when they extend beyond the parent's visible area due to text selection handles), when we select all the input content there is a moment where the magnfier (in android) try to adjust to the space available and we get the error / weird behavior.

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

We can remove the overflowHidden for the rest of navigators/devices and let it in Safari when mobile (due the bug there is because the magnifier behavior) in the View component inside SignInPageLayout: `<View style={[ styles.flex1, styles.flexColumn, Browser.isMobileSafari() ? styles.overflowHidden : {}, StyleUtils.getMinimumHeight(backgroundImageHeight), StyleUtils.getSignInBgStyles(theme), ]}

`

Before changes:

https://github.com/Expensify/App/assets/5216036/f70997a7-035e-4b25-9a1c-6316a4f2a63b

After changes with previous bug fix tested:

https://github.com/Expensify/App/assets/5216036/097a6aa3-e47c-4cd3-84aa-67f98dc68ebb

melvin-bot[bot] commented 6 months ago

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

fedirjh commented 6 months ago

@charles-liang Your root cause analysis is not clear to me. It does not explain why this issue occurs when the input text is long.

fedirjh commented 6 months ago

@samilabud It seems overflowHidden style was implemented in this PR https://github.com/Expensify/App/pull/25457 to fix another issue (https://github.com/Expensify/App/issues/24328). Is it safe to remove this style? Won’t the old bug reappear?

samilabud commented 6 months ago

@samilabud It seems overflowHidden style was implemented in this PR #25457 to fix another issue (#24328). Is it safe to remove this style? Won’t the old bug reappear?

Hi @fedirjh, you were right, I have updated my proposal, I have included new video with evidence, here below what was happening with my previous proposal (was working for mobile chrome only):

https://github.com/Expensify/App/assets/5216036/c77bc6dc-0606-42be-bfe6-b1a145795aed

charles-liang commented 6 months ago

@fedirjh

@charles-liang Your root cause analysis is not clear to me. It does not explain why this issue occurs when the input text is long.

I understand that removing overflow: hidden might cause other issues, which is why I didn’t propose it. Since position: absolute can expand the page and make this section scrollable, it’s only because overflow: hidden hides the scrollbar that users can't scroll, but it doesn’t prevent scrolling programmatically. On Android mobile web, when a toolbar pops up, the system will position the menu to the right of the last character of the text if the right side can scroll, which would cause the page to scroll. If it can't scroll, it will shift to the left. That's why this issue only appears on Android’s mobile web.

The longtext does not need to be very long; it only needs to exceed the length of the input box by a few characters, depending on the width of the whitespace to the right of the input box.

On the other hand, position: fixed doesn’t expand the page and prevents scrolling.

If this makes it clearer for you, I will update my proposal.

puneetlath commented 6 months ago

@fedirjh how's this going?

melvin-bot[bot] commented 6 months ago

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

fedirjh commented 6 months ago

how's this going?

Will continue the review today.

melvin-bot[bot] commented 6 months ago

@puneetlath @fedirjh 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!

fedirjh commented 6 months ago

@charles-liang Thanks for the update. However, I am leaning toward @samilabud solution. I believe that removing the style causing the issue (overflowHidden) and applying it selectively to mWeb Safari would be the most effective approach.

fedirjh commented 6 months ago

Let's proceed with @samilabud's Proposal.

🎀 👀 🎀 C+ reviewed

melvin-bot[bot] commented 6 months ago

Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

samilabud commented 6 months ago

Thanks @fedirjh, I have created the PR, just waiting for the upwork offer.

Anything else I'm at your service!

puneetlath commented 6 months ago

Sorry, just for my understanding, does Safari treat overflow:hidden different than Chrome?

samilabud commented 6 months ago

Sorry, just for my understanding, does Safari treat overflow:hidden different than Chrome?

Not really, the problem with Safari is that it has a magnifying glass that affects the CSS and in this case makes the content move as if it had a scroll (even with the overflow hidden).

melvin-bot[bot] commented 6 months ago

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

Offer link Upwork job

melvin-bot[bot] commented 6 months ago

📣 @samilabud 🎉 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[bot] commented 5 months ago

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

melvin-bot[bot] commented 5 months ago

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

If no regressions arise, payment will be issued on 2024-05-22. :confetti_ball:

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

melvin-bot[bot] commented 5 months ago

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:

fedirjh commented 5 months ago

BugZero Checklist:

Regression Test Proposal

1. Go to https://staging.new.expensify.com/ on mobile web
2. Tap the email field
3. Enter a very long email
4. Double-tap the email to select it or long press to use the magnifier
5. Try to scroll (swipe) to the left or right
6. Verify content is static and can't be moved to the sides
puneetlath commented 5 months ago

Regression test update here: https://github.com/Expensify/Expensify/issues/398940

Everyone has been paid. Thanks y'all!