-
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
[HOLD #31705][$500] Desktop - Compose Box - When the app reloads, "Write something..." text and the cursor moves up #31744
Comments
Job added to Upwork: https://www.upwork.com/jobs/~014ec0e25eb59f5d17 |
Triggered auto assignment to @sakluger ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif ( |
Not seeing this in dev. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Composer style is broken when navigate back from not found page after reload What is the root cause of that problem?App/src/components/Composer/index.js Line 348 in 6aa94c9
textInput.current.scrollHeight is set to 0 so this function returns 0 which makes numberOfLines also 0 and thus rows prop valueApp/src/components/Composer/index.js Line 451 in 6aa94c9
I think this is race condition. scroll height is 0 because What changes do you think we should make in order to solve the problem?Pass |
First of all, why does reloading the page take you to the "Hmm...it's not here" page? That seems like a bigger bug. Does that only happen on Desktop or on other platforms too? For the compose box spacing issue, @mkhutornyi do you have any ideas why it's only happening on Desktop and not on other platforms? |
It's known bug - #28495, #31592 Cursor issue happens on web as well. Here's simple repro step:
|
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@sakluger, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Thanks for sharing those other issues! I looked but couldn't find them. @aimane-chnaif what do you think about @mkhutornyi's proposed solution? |
This solution sounds good. @bernhardoj did you have any reason for setting this value to 0, not 1? |
The We had discussed it before here whether to set it as 0 or 1. |
Ah yes, I remember. But I don't see any difference between 0 or 1 even when multiline |
I think we should look at the PR that implemented it. This is the commit that changed it from 1 to undefined. But I think changing it to 1 (or any other value) is not the solution here. I checked that the issue is the |
This is known bug - #31705 Maybe we can put on hold a bit since we cannot test all cases without fixing that bug |
While waiting for the draft issue, here is my proposal ProposalPlease re-state the problem that we are trying to solve in this issue.Open a not found page and then press back will show a composer with 2 lines. What is the root cause of that problem?When we open a not found page (e.g. /asd), the nav stack looks like this: In react-navigation, a previous not focused screen will have a And so the number of lines calculation always returns 0. A number of lines/rows is 0 is the same as not setting the What changes do you think we should make in order to solve the problem?One trick to keep the report screen displayed is by setting the not found page screen App/src/libs/Navigation/AppNavigator/AuthScreens.js Lines 327 to 331 in 2e8de3f
And because we made it transparent, we must set a background color for not found page.
What alternative solutions did you explore? (Optional)Re-calculate the number of lines every time the report screen gets focused. In Composer/index.js
Without the delay, the display is still none even after when it gets focused If there is a not found page, don't add a report screen to the navigation. In CustomRouter.js +const isNotFoundPageInState = (state) => _.find(state.routes, (r) => r.name === SCREENS.NOT_FOUND)
-if (!isAtLeastOneCentralPaneNavigatorInState(partialState) && !options.getIsSmallScreenWidth()) {
+if (!isAtLeastOneCentralPaneNavigatorInState(partialState) && !options.getIsSmallScreenWidth() && !isNotFoundPageInState(partialState)) {
addCentralPaneNavigatorRoute(partialState); |
Still on hold for #31705. |
Still on hold for #31705. |
The holding issue is on hold for #32461 |
Still on hold. |
Still on hold for #35449. |
The holding PR is merged and deployed, and I can't seem to reproduce this issue. I think it's fixed! @aimane-chnaif I'm pretty sure no payment is due on this one, can you please confirm before I close the issue? |
The bug is not reproducible because of recent regression (maybe navigation refactor) which reloads report screen every time after navigating back. |
Let's close this for now. I will bump here to reopen when this is reproducible again in the future. |
Sounds good. If we need to reopen this issue in the future, can you please bump in Slack instead? I sometimes miss notifications related to closed GH issues. |
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.2-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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
When the application reloads, "Write something..." text and the cursor should be centered in the Compose Box
Actual Result:
When the application reloads, "Write something..." text and the cursor moves up in the Compose Box
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6287583_1700678534952.Recording__762.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: