-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Due for payment 2025-02-13] [$250] Log in - Login page scroll to top on change language #55368
Comments
Triggered auto assignment to @johncschuster ( |
|
1 similar comment
|
🚨 Edited by proposal-police: This proposal was edited at 2025-01-16 21:58:56 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Login page scroll to top on change language What is the root cause of that problem?Because we passed
What changes do you think we should make in order to solve the problem?Remove
Note: We should not remove this block because What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Log in - Login page scroll to top on change language What is the root cause of that problem?Here’s a rewritten version of your text with improved clarity and flow: The Evidence of this can be observed by commenting out both properties—while the UI may display hidden components, the rerendering issue no longer occurs. What changes do you think we should make in order to solve the problem?To address this, we should use an alternative method to track App/src/pages/signin/SignInPageLayout/index.tsx Lines 76 to 82 in 57f544f
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional)N/A |
@johncschuster Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Job added to Upwork: https://www.upwork.com/jobs/~021881832199834454313 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Login page scroll to top on change language What is the root cause of that problem?The reason
and the component re-renders due to stale references if signInPageLayoutRef.current changes after the assignment App/src/pages/signin/SignInPage.tsx Line 325 in 550b32b
What changes do you think we should make in order to solve the problem?To resolve this issue, use an arrow function that wraps the scrollPageToTop call. This ensures signInPageLayoutRef.current is accessed at execution time, keeping the reference up-to-date and preventing SignInPageLayout from triggering unnecessary re-renders App/src/pages/signin/SignInPage.tsx Line 325 in 550b32b
update to: scrollPageToTop={() => {
signInPageLayoutRef.current?.scrollPageToTop();
}} POCScreen.Recording.2025-01-22.at.15.53.08.mp4What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?This is a UI bug and does not require testing. What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
Update: I'll review the proposals tomorrow. |
Still under reviewing |
🚨 Edited by proposal-police: This proposal was edited at 2025-01-24 10:56:54 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Log in - Login page scroll to top on change language What is the root cause of that problem?This issue occurs because the language change triggers a App/src/pages/signin/SignInPageLayout/index.tsx Lines 76 to 82 in aa849f1
When the welcomeHeader or welcomeText changes, it causes the page to scroll to the top. This behavior seems to be related to a previous issue that was fixed in PR #21815.However, the issue has resurfaced because the component re-renders twice, which leads to the condition prevPreferredLocale !== preferredLocale evaluating to false , which leads to the page scrolling to the top
What changes do you think we should make in order to solve the problem?I suggest removing the App/src/pages/signin/SignInPageLayout/index.tsx Lines 76 to 82 in aa849f1
Why should we remove it? This useEffect was introduced in PR #17445 to ensure the page scrolls to the top when clicking actions like "Create A New Account," "Log In," "Go Back," or "Forget." However, this functionality is now handled by a separate implementation introduced in PR #33743, making this useEffect redundant.
POC
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
Thanks everyone for the proposals. After checking carefully. I agree with @linhvovan29546 's proposal here. We should remove this block of code. It was added to solve #16357 but it was resolved with #33743 and we don't need it anymore. 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @robertjchen, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Thanks for the detailed review and proposals. Let's go with @linhvovan29546 's proposal 👍 |
📣 @linhvovan29546 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR is ready for review! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.94-25 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 2025-02-13. 🎊 For reference, here are some details about the assignees on this issue:
|
@hungvu193 @johncschuster @hungvu193 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test Proposal Template
Regression Test ProposalPrecondition:Test:Do we agree 👍 or 👎 |
Payment SummaryContributor: @linhvovan29546 paid $250 via Upwork (will be paid after BZ Checklist and regression threshold window has been crossed) |
@robertjchen @johncschuster @hungvu193 @linhvovan29546 this issue is now 4 weeks old, please consider:
Thanks! |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Test:
Do we agree 👍 or 👎 |
Payment has been issued via Upwork to @linhvovan29546! @hungvu193, please request payment via ND! (Summary here) |
$250 approved for @hungvu193 |
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: 9.0.86-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Preconditions: User should be logged out
Expected Result:
Page position should not be changed
Actual Result:
Login page scroll to top
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6698620_1734580924023.295.mp4
View all open jobs on GitHub
555555555.mp4
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @johncschusterThe text was updated successfully, but these errors were encountered: