-
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
PR 3: Adding EmojiPicker to the Edit Comment #7580
PR 3: Adding EmojiPicker to the Edit Comment #7580
Conversation
@parasharrajat for
It seems you're the code owner. I can't find how What is happening is, after I close EmojiPicker on any edit comment, it calls this |
Ok. I see. I will tell you what is the use of it and how to manage this when I will review the PR. I am waiting on the first PR to be merged. We will go step by step. |
…moji-picker-in-edit-message # Conflicts: # src/pages/home/report/ReportActionCompose.js # src/pages/home/report/ReportActionItemMessageEdit.js
…moji-picker-in-edit-message # Conflicts: # src/components/EmojiPicker/EmojiPickerButton.js
For this, you can use Now, you can set the focus back to editbox same as
|
…moji-picker-in-edit-message
Any update on PR? |
@parasharrajat @Julesssss PR updated with the feedback and bugs resolved. Can you please review it? |
src/components/EmojiPicker/index.js
Outdated
@@ -79,6 +79,7 @@ class EmojiPicker extends React.Component { | |||
|
|||
this.emojiPopoverAnchor.measureInWindow((x, y, width) => this.setState({ | |||
emojiPopoverAnchorPosition: {horizontal: x + width, vertical: y}, | |||
isEmojiPickerVisible: true, |
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 could be a problem and this is an extra render. measureEmojiPopoverAnchorPosition is tied to Dimensions Change event and thus we should not do this here. But you can use this method to get the dimensions
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 had earlier not done it here if you see, I want the picker to be visible after the anchor position is calculated. With the earlier case, I faced this issue #3245 (comment)
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.
Yup. I saw that.
But you can use this method to get the dimensions
Use this method to get dimensions only. Then where you are opening the picker and set the dimensions on state. Then create another method that will also get the dimensions from it and update the state. This new method will be used in Dimensions change.
…moji-picker-in-edit-message
Any update @mananjadhav ? |
Working on it today. Can you confirm the state change is the only change and no other changes? |
Yup. Rest looks good to me. |
@parasharrajat PR updated |
@mananjadhav Could you please merge the main? I am testing it now. Sorry for the delay. |
@shawnborton is the margin correct for picker icon? |
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 but awaiting design review.
…moji-picker-in-edit-message
Done. |
that looks a bit too narrow to me, I would increase it some. |
Agree with Megan. Also it doesn't look centered through the middle? General rule of thumb, margins on top, bottom, and sides, should look the same. |
I'll fix the margin-right, in the edit mode, but vertical alignment looks fine as far as I can see. Here's the screenshot for edit and create mode. I used the same style, will 3px more on the right be fine? |
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.
cc: @Julesssss
PR Reviewer Checklist
- I verified the PR has a small number of commits behind
main
- I verified the correct issue is linked in the
### Fixed Issues
section above - I verified testing steps are clear and they cover the changes made in this PR
- I verified the testing environment is mentioned in the test steps
- I verified testing steps cover success & fail scenarios (if applicable)
- I checked that screenshots or videos are included for tests on all platforms
- I verified tests pass on all platforms & I tested again on:
- iOS / native
- Android / native
- iOS / Safari
- Android / Chrome
- MacOS / Chrome
- MacOS / Desktop
- I verified there are no console errors related to changes in this PR
- I verified proper code patterns were followed (see Reviewing the code)
- I verified comments were added when the code was not self explanatory
- I verified any copy / text shown in the product was added in all
src/languages/*
files (if applicable) - I verified proper naming convention for platform-specific files was followed (if applicable)
- I verified style guidelines were followed
- I verified the JSDocs style guidelines (in
STYLE.md
) were followed
- I verified that this PR follows the guidelines as stated in the Review Guidelines
- I verified other components are not impacted by changes in this PR (i.e. if the PR modifies a shared library or component like
Avatar
, I verified the components usingAvatar
are working as expected) - I verified the UI performance was not affected (the performance is the same than
main
branch) - If a new component is created I verified that a similar component doesn't exist in the codebase
🎀 👀 🎀 C+ reviewed
Tests well, better emoji support than Github! 👍 😎 🥇 ☕ |
✋ 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 @Julesssss in version: 1.1.47-0 🚀
|
🚀 Deployed to production by @roryabraham in version: 1.1.49-1 🚀
|
<View style={styles.editChatItemEmojiWrapper}> | ||
<EmojiPickerButton | ||
isDisabled={shouldDisableEmojiPicker} | ||
onModalHide={() => InteractionManager.runAfterInteractions(() => this.textInput.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.
Coming from #30119
If, at the beginning, a composer's emoji picker is open, opening some other emoji picker results in a race:
- Here, we focus the composer because the original emoji picker hides
- The other emoji picker focuses its search field
Details
Fixed Issues
$ #3245
Tests
QA Steps
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android