-
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
#22803 followup - update composer handlePaste conditions #23135
Conversation
@Santhosh-Sellavel 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] |
Reviewer Checklist
Screenshots/VideosThis specifically web/desktop so skipped native. Does not affect mWeb either but for testing, I included mWeb Safari! Web & DesktopScreen.Recording.2023-07-22.at.2.36.15.AM.movMobile Web - SafariSimulator.Screen.Recording.-.iPhone.14.-.2023-07-22.at.02.41.34.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.
LGTM, all yours @cristipaval or @francoisl!
The cursor misplacement while pasting that issue is a regression from here.
const isVisible = this.props.checkComposerVisibility(); | ||
const isFocused = this.textInput.isFocused(); | ||
|
||
if (!(isVisible || isFocused)) { |
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.
NAB This is understandable, but we can refactor this into a single line and add comment.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
event.preventDefault(); | ||
|
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.
@robertKozik Why we moved this to the top?
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.
It causes a regression here, #23502.
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.
My bad, sorry 😢
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.
Oh I think it's the same cause as this one #23539
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.
It's the same cause, so I think one fix will fix both!
🚀 Deployed to staging by https://github.com/cristipaval in version: 1.3.45-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.45-7 🚀
|
Details
This PR fixes problem with pasting functionality when more than one composer component is present. Paste event should be handled in focused composer. If no composer is focused, paste event should be handled by main composer.
Fixed Issues
$ #22803
PROPOSAL: #22803 (comment)
Tests
edit comment
Offline tests
Same as test steps
QA Steps
Same as test 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
Only relevant platforms
Web
desktop.-.web.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
desktop.-.native.mov
iOS
Android