-
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 for payment 2024-11-22] [$250] Pressing up arrow to edit the previous message, there is a bad overlap with the recipients local time. #51431
Comments
Triggered auto assignment to @strepanier03 ( |
Edited by proposal-police: This proposal was edited at 2024-10-24 19:35:48 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Pressing up arrow to edit the previous message, there is a bad overlap with the recipients local time. What is the root cause of that problem?The message edit mode container is large and the scroll position remains the same after expanding the content. What changes do you think we should make in order to solve the problem?Add following line
What alternative solutions did you explore? (Optional)Add bellow useEffect in ReportActionItem component
What alternative solutions did you explore? (Optional)Add bellow useEffect in ReportActionItemMessageEdit component
We can also use |
ProposalPlease re-state the problem that we are trying to solve in this issue.Pressing the up arrow to edit the last message doesn't show it fully. What is the root cause of that problem?In our custom MVCPFlatList, we enable the App/src/components/FlatList/index.tsx Lines 124 to 131 in 66112d1
The issue in this case is, the scroll to the bottom (0) doesn't work and looks like it's conflicting with the edit composer focus. For the scroll to bottom, we set the scroll animated to true (2nd param), which will set the behavior to smooth scrolling. So, the edit composer focus interrupt the scrolling. App/src/components/FlatList/index.tsx Lines 127 to 129 in 66112d1
If we remove auto-focus from the edit composer, then it works fine, but we can't do that. What changes do you think we should make in order to solve the problem?If the mutation is an addition of an edit composer, then don't scroll with animation. First, App/src/components/FlatList/index.tsx Line 111 in 66112d1
App/src/components/FlatList/index.tsx Line 129 in 66112d1
Then, we check if the mutation list contains an added nodes of the edit composer. App/src/components/FlatList/index.tsx Lines 142 to 166 in 66112d1
If an edit composer action is added, then we pass the Last, we need to add the
What alternative solutions did you explore? (Optional)We have a few alternatives here. Delay the auto scroll to bottom here using InteractionManager, let the focus happens first. App/src/components/FlatList/index.tsx Lines 128 to 130 in 66112d1
Delay the focus using InteractionManager, App/src/libs/focusComposerWithDelay/index.ts Lines 30 to 38 in 66112d1
OR we can wait for the scroll event to ends, but the scroll end event actually just use setTimeout 250ms after there is no onScroll event received anymore. App/src/components/InvertedFlatList/index.tsx Lines 75 to 83 in 66112d1
We can manually scroll when the edit composer is focused, but App/src/pages/home/report/ReportActionItemMessageEdit.tsx Lines 521 to 530 in 66112d1
App/src/hooks/useReportScrollManager/index.ts Lines 11 to 18 in 66112d1
So, what we can do is to only scroll if it's the last action.
We can get the last visible report action inside
Then, pass App/src/pages/home/report/ReportActionsList.tsx Lines 531 to 532 in 66112d1
If we want to always scroll the edit composer to bottom (specifically to put it above the main composer), then we can remove the App/src/hooks/useReportScrollManager/index.ts Lines 11 to 17 in 66112d1
|
I think this issue may be a dupe (thank you @shahinyan11!) closing in favor if this one as it already has a proposal |
@strepanier03 Eep! 4 days overdue now. Issues have feelings too... |
Job added to Upwork: https://www.upwork.com/jobs/~021851399834739628625 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws ( |
@strepanier03, @Ollyws Huh... This is 4 days overdue. Who can take care of this? |
Will get to this one tomorrow morning. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@bernhardoj's proposal LGTM. |
Triggered auto assignment to @rlinoz, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
PR is ready cc: @Ollyws |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.62-4 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 2024-11-22. 🎊 For reference, here are some details about the assignees on this issue:
|
@Ollyws @strepanier03 @Ollyws 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] |
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: 9.0.53-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @tgolen
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1729781934730029
Action Performed:
Expected Result:
User able to edit last message sent and no visual issues
Actual Result:
Selected message box overlaps with the recipients local time
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @strepanier03The text was updated successfully, but these errors were encountered: