-
Notifications
You must be signed in to change notification settings - Fork 3k
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 ios and msafari to scroll text of edit message to bottom when click edit comment #30857
Conversation
…ck edit comment Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
@narefyev91 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@@ -194,6 +194,9 @@ function ReportActionItem(props) { | |||
return; | |||
} | |||
|
|||
if (textInputRef.current) { | |||
textInputRef.current.focus(); | |||
} |
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 am putting the focus here because if I put it in the mount of ReportActionItemMessageEdit, there will be a regression about:
If user leave the edited text message without closing it then he visit other report and comeback to the first report, the report action list will scroll to the unclosed text input of the edited message.
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.
Hey @tsa321 - i think it's not a regression - if user has opened edit message - and move back and again to the same report - we should focus editing message box
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.
scroll_to_edit_d.mp4
@narefyev91 Just to confirm, this is expected right? I will edit the code...
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.
Yes - that's expected
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.
@tsa321 let me know - when you will be remove those lines of code - i will start testing in parallel
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.
Please wait, maybe in one or two hours I will move those lines to mount of the ReportActionEditMessage.
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.
Done
@@ -181,6 +181,7 @@ function ReportActionItemMessageEdit(props) { | |||
}); | |||
return prevDraft; | |||
}); | |||
textInputRef.current.scrollTop = textInputRef.current.scrollHeight; |
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 line is specifically for ios-msafari, so I am putting it here.
Reviewer Checklist
Screenshots/VideosWebweb.1.mp4Mobile Web - Chromeandroid-web.1.mp4Mobile Web - Safariios-web.mp4Desktopdesktop.mp4iOSios.mp4Androidandroid.mp4 |
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.
Just need to remove lines from this file.
LGTM!
🎀 👀 🎀 C+ reviewed
Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
@@ -429,6 +429,7 @@ function ReportActionsList({ | |||
keyboardShouldPersistTaps="handled" | |||
onLayout={onLayoutInner} | |||
onScroll={trackVerticalScrolling} | |||
onScrollToIndexFailed={() => {}} |
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 PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/tylerkaraszewski in version: 1.3.96-0 🚀
|
This PR introduced this regression. |
@narefyev91 since this PR introduce regression on andorid, Can I move the logic into IOS or safari specific platform code? |
Yes let's separate fix only for platforms in which we have issues |
Here is the follow up PR: #31041 |
Issue reproducible on latest build 1.3.97-2 RPReplay_Final1699517579.MP4 |
@narefyev91 Looks like my proposal for IOS native doesn't always works reliably, What should we do? |
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.97-7 🚀
|
Was not able to reproduce issue mentioned in 1.3.97-2. Tested on latest main Screen.Recording.2023-11-13.at.13.55.05.mov |
Details
Fixed Issues
$ #29782
PROPOSAL: #29782 (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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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