-
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
[TS migration] Migrate 'EmojiPicker' component to TypeScript #37641
Conversation
@abdulrahuman5196 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] |
@abdulrahuman5196 I will add the remaining platform videos shortly, other than that PR is ready for review. |
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.
Overall good work! 🤟
src/components/EmojiPicker/EmojiPickerMenuItem/index.native.tsx
Outdated
Show resolved
Hide resolved
src/components/EmojiPicker/EmojiPickerMenuItem/index.native.tsx
Outdated
Show resolved
Hide resolved
src/components/EmojiPicker/EmojiPickerMenu/BaseEmojiPickerMenu.tsx
Outdated
Show resolved
Hide resolved
src/components/EmojiPicker/EmojiPickerMenu/BaseEmojiPickerMenu.tsx
Outdated
Show resolved
Hide resolved
src/components/EmojiPicker/EmojiPickerMenu/BaseEmojiPickerMenu.tsx
Outdated
Show resolved
Hide resolved
src/components/EmojiPicker/EmojiPickerMenu/BaseEmojiPickerMenu.tsx
Outdated
Show resolved
Hide resolved
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.
Added some comments regarding assertion, let's try to get rid of them. Other than that I think we are very close 🚀
src/components/EmojiPicker/EmojiPickerMenu/useEmojiPickerMenu.ts
Outdated
Show resolved
Hide resolved
@HezekielT Let's continue migrating, I believe we are very close 🙏 |
@blazejkustra Apologies for the delay, I've been busy the last few days. I will try to push the changes you suggested asap. Thanks for the patience. 🙏 |
9950168
to
fdedba1
Compare
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.
Small comments, otherwise LGTM! LEt's test it thoroughly :D
@HezekielT we have conflicts here. Could you resolve them and tag @abdulrahuman5196 to review the PR? Thanks! |
8f32c47
to
09bac6c
Compare
@abdulrahuman5196 Could you please review this PR when you get the chance? 🙏 Thanks! |
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
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.
one nit , lgtm!
<CategoryShortcutButton | ||
icon={headerEmoji.icon} | ||
onPress={() => props.onPress(headerEmoji.index)} | ||
onPress={() => onPress(headerEmoji.index)} | ||
// eslint-disable-next-line react/no-array-index-key |
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 we can use something better for index instead of disabling this line?
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.
@HezekielT bump on 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 we can use headerEmoji.index
instead of i
👍
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.
replaced the array index usage by headerEmoji.index @kubabutkiewicz
@abdulrahuman5196 bump |
@HezekielT Can you merge main? |
09bac6c
to
1f13dce
Compare
Hi, Will work on review today. |
@HezekielT Screen.Recording.2024-04-01.at.10.08.26.PM.mov |
Thanks @abdulrahuman5196 for the review. I will investigate why the bug is happening. |
@abdulrahuman5196 The issue should be fixed now. Could you please review again when you get the chance? Thanks. |
….tsx Co-authored-by: Błażej Kustra <[email protected]>
@abdulrahuman5196 merged the latest main and fixed the conflict 👍 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-04-09.at.12.22.59.AM.mp4Android: mWeb ChromeScreen.Recording.2024-04-09.at.12.34.27.AM.mp4iOS: NativeScreen.Recording.2024-04-09.at.12.11.45.AM.mp4iOS: mWeb SafariScreen.Recording.2024-04-09.at.12.17.13.AM.mp4MacOS: Chrome / SafariScreen.Recording.2024-04-09.at.12.05.26.AM.mp4MacOS: DesktopScreen.Recording.2024-04-09.at.12.07.22.AM.mp4 |
I am seeing couple of issues in composer selection after selecting emoji. These issues are also available in staging so I don't think its required to hold this PR for that. |
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.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @tylerkaraszewski
🎀 👀 🎀
C+ Reviewed
✋ 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.4.62-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/tylerkaraszewski in version: 1.4.62-0 🚀
|
🚀 Deployed to staging by https://github.com/tylerkaraszewski in version: 1.4.62-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.62-17 🚀
|
@@ -50,34 +53,39 @@ const EmojiPicker = forwardRef((props, ref) => { | |||
* | |||
* Don't directly get the ref from emojiPopoverAnchorRef, instead use getEmojiPopoverAnchor() | |||
*/ | |||
const getEmojiPopoverAnchor = useCallback(() => emojiPopoverAnchorRef.current || emojiPopoverAnchorRef, []); | |||
const getEmojiPopoverAnchor = useCallback(() => emojiPopoverAnchorRef.current ?? emojiPopoverAnchorRef?.current, []); |
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 should be emojiPopoverAnchorRef
same as the original code
Details
Migrates
EmojiPicker
to typescript.Fixed Issues
$ #25155
PROPOSAL:
Tests
Offline tests
Same as
Tests
section.QA Steps
Same as
Tests
section.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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label 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_migrate_emojiPicker_to_ts.mov
Android: mWeb Chrome
mweb_emoji_picker.mov
iOS: Native
ios_native_emoji_picker.mov
iOS: mWeb Safari
ios_safari_Emoji_picker.mov
MacOS: Chrome / Safari
Web_emojiPicker.mov
MacOS: Desktop
desktop_emoji_picker.mov