-
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
Fix editing a task, navigate app to other report #51381
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tsaqif <[email protected]>
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-11-20.at.1.09.48.in.the.afternoon.movAndroid: mWeb ChromeScreen.Recording.2024-11-04.at.5.49.29.in.the.afternoon.moviOS: NativeScreen.Recording.2024-11-20.at.1.29.46.in.the.afternoon.moviOS: mWeb SafariScreen.Recording.2024-11-04.at.5.32.57.in.the.afternoon.movMacOS: Chrome / SafariScreen.Recording.2024-11-04.at.5.19.47.in.the.afternoon.movMacOS: DesktopScreen.Recording.2024-11-20.at.1.26.01.in.the.afternoon.mov |
@tsa321 strangely it kind of scrolls on android native after changing the description Screen.Recording.2024-11-04.at.5.57.22.in.the.afternoon.mov |
@getusha, it looks like the Android issue is related to the appearance of the keyboard / the focus of the composer. As you can see in the main, if we open the description page and then press the back button, the report scrolls: backButtonOnMain.mp4This issue only occurs if the composer was previously focused. If the composer is not focused beforehand, the report does not scroll: test3.mp4This bug is related to the keyboard appearing and also occurs in the main. |
@getusha: So basically, the scroll bug on Android is unrelated to the issue. To confirm this, you can reproduce the bug even without editing a task. You can test it by tapping the back button in the header of the Edit Description page (without editing the description). The report will scroll slightly after the keyboard appears: backButtonOnMain.mp4 |
@tsa321 the expected behavior is for it not to scroll after we edit the description/title. It does seem related to me |
@getusha, the bug exists even without editing the task, as I mentioned here. Also, that bug is that the report scrolls a little in Android, while the bug we are trying to fix is that the report scrolls to the bottom. I believe the bug is related to this file: Also, I think @janicduplessis has more context on the bug. cc @deetergp |
@deetergp Is this really a bug or the expected behavior? keyboard-showup.mp4When a user opens the keyboard, the text above the composer stays positioned right above it, which results in the upper portion of the report being hidden. I believe this is expected behavior. |
@getusha to fix the issue, the auto focus must be disabled in android/ ios, so the keyboard doesn't push the report screen. |
I don't really understand what the bug might be. @getusha could you clarify for me what you feel is the expected behavior here? From what I see in the videos posted in this PR, it looks like it is behaving the way it ought to, so I am a little confused. |
It appears to scroll to the bottom when the composer is re-focused, seems like it has a different root cause as @tsa321 mentioned. Screen.Recording.2024-11-20.at.1.05.34.in.the.afternoon.mov |
src/libs/actions/Task.ts
Outdated
@@ -1102,7 +1102,7 @@ function deleteTask(report: OnyxEntry<OnyxTypes.Report>) { | |||
}; | |||
|
|||
API.write(WRITE_COMMANDS.CANCEL_TASK, parameters, {optimisticData, successData, failureData}); | |||
Report.notifyNewAction(report.reportID, currentUserAccountID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this necessary for deleteTask?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will revert this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you forgot to push the changes
@getusha Could you rephrase this? I don't quite understand what you mean. To test the bug you mentioned, you need to have a lot of text in the reports, for example, more than 50 messages, to ensure that the bug either scrolls a bit or scrolls to the bottom. |
@tsa321 we discussed this before #51381 (comment) |
This comment was marked as resolved.
This comment was marked as resolved.
Yes, @tsa321 i said it has a different root cause 😄
I am just answering for #51381 (comment) |
@getusha Oh ok, sorry I misunderstood. |
Signed-off-by: Tsaqif <[email protected]>
@getusha I have reverted the changes in the deleteTask |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is good to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really think we need the comments—let's drop them.
Signed-off-by: Tsaqif <[email protected]>
@deetergp I have removed the comments. |
Details
Fixed Issues
$ #47671
PROPOSAL: #47671 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android-native-d.mp4
Android: mWeb Chrome
android-mweb_d.mp4
iOS: Native
ios-native_d.mp4
iOS: mWeb Safari
ios-msfari_d.mp4
MacOS: Chrome / Safari
macos-web-d.mp4
MacOS: Desktop
macos-desktop_d.mp4