-
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 space inconsistency inserting emoji #21749
Fix space inconsistency inserting emoji #21749
Conversation
@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] |
@getusha based on you video in web - last test - when you have a text after emoji - and insert during typing - i do not see space after it, can you please double check? |
@narefyev91 i did that intentionally because i think we only need to add the space if there is no text after it. Can you confirm if we want the space without the above condition? |
i think we should - because when you choose an emoji in dropdown or while typing pressing enter - it will add space |
thanks i will remove the condition. |
@narefyev91 Done, i also updated the screen recording for the web. |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromeandroid-web.movMobile Web - Safariios-web.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
start: prevSelection.start + emoji.length, | ||
end: prevSelection.start + emoji.length, | ||
start: prevSelection.start + emoji.length + CONST.SPACE_LENGTH, | ||
end: prevSelection.start + emoji.length + CONST.SPACE_LENGTH, |
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.
can you please add some description why do you change that - for future and easy reading for any other devs
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.
Should we add it here? there are multiple places where space_length is added.
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.
Maybe on the top of the current function (somewhere in description)
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.
TBH I think we're good without the comment since we have other instances without comments and that hasn't been a problem yet.
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.
* we will add CONST.SPACE_LENGTH which is equal to 1 to the selection state
* this will make sure the cursor is on the right place after the emoji is inserted
what do you think about 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.
@getusha everything is fine - as @luacmartins mentioned we can skip it - thanks for flexibility
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.
@narefyev91 ohh, i missed that thanks!
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!
🎀 👀 🎀 C+ reviewed
Thanks for the quick turnaround everyone! |
✋ 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/luacmartins in version: 1.3.35-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.35-5 🚀
|
1 similar comment
🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.35-5 🚀
|
Details
Fixed Issues
$ #21584
PROPOSAL: #21584 (comment)
Tests
:smile:
, opening emoji pickerOffline tests
Same as tests
QA Steps
Same as tests
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
Web
Screen.Recording.2023-06-28.at.3.32.16.PM.mov
Mobile Web - Chrome
space-android.mov
Mobile Web - Safari
space-ios-web.mov
Desktop
Screen.Recording.2023-06-28.at.1.44.32.PM.mov
iOS
Screen.Recording.2023-06-28.at.1.41.28.PM.mov
Android
android-native-space.mov