-
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 'Reactions' component to TypeScript #32929
[TS migration] Migrate 'Reactions' component to TypeScript #32929
Conversation
# Conflicts: # src/components/Reactions/AddReactionBubble.tsx # src/components/Reactions/EmojiReactionBubble.js
# Conflicts: # src/components/Reactions/AddReactionBubble.tsx # src/components/Reactions/EmojiReactionBubble.js # src/components/Reactions/MiniQuickEmojiReactions.tsx # src/components/Reactions/QuickEmojiReactions/BaseQuickEmojiReactions.js # src/components/Reactions/ReactionTooltipContent.js # src/components/Reactions/ReportActionItemEmojiReactions.tsx
# Conflicts: # src/components/Reactions/AddReactionBubble.tsx # src/components/Reactions/QuickEmojiReactions/index.js # src/components/Reactions/QuickEmojiReactions/index.native.tsx # src/libs/EmojiTrie.ts # src/libs/EmojiUtils.ts # src/libs/actions/EmojiPickerAction.ts
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, just couple questions
@@ -26,10 +29,10 @@ const emojiCodeTableWithSkinTones = emojis.reduce<EmojiTable>((prev, cur) => { | |||
return newValue; | |||
}, {}); | |||
|
|||
const localeEmojis = { | |||
const localeEmojis: LocaleEmojis = { |
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.
Why was this needed?
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.
Otherwise, I had a TS error in this function. I guess it also could be resolved with assertion/additional conditions if you think type update isn't a good idea
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 fine as you coded 👍
# Conflicts: # assets/emojis/index.ts # src/libs/EmojiTrie.ts # src/libs/EmojiUtils.ts # src/libs/actions/EmojiPickerAction.ts # src/pages/home/ReportScreenContext.ts # src/pages/home/report/ContextMenu/ReportActionContextMenu.ts
Reviewer Checklist
Screenshots/VideosAndroid: NativeCleanShot.2024-01-04.at.18.26.43.mp4Android: mWeb ChromeCleanShot.2024-01-04.at.18.43.02.mp4iOS: NativeCleanShot.2024-01-04.at.17.21.32.mp4iOS: mWeb SafariCleanShot.2024-01-04.at.17.09.02.mp4MacOS: Chrome / SafariCleanShot.2024-01-04.at.17.06.10.mp4MacOS: DesktopCleanShot.2024-01-04.at.18.55.32.mp4 |
@@ -24,7 +24,7 @@ type ReportActionReaction = { | |||
users: UsersReactions; | |||
|
|||
/** Is this action pending? */ | |||
pendingAction?: OnyxCommon.PendingAction; | |||
pendingAction: OnyxCommon.PendingAction; |
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.
pendingAction
doesn’t seems like a required prop.
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.
@fedirjh Right, I've prepared a follow-up PR
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.
@VickyStash Thanks for raising a quick PR.
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.
Looking good and tests well.
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25153 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
✋ 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/AndrewGable in version: 1.4.23-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.23-4 🚀
|
Details
[TS migration] Migrate 'Reactions' component to TypeScript
Fixed Issues
$ #25153
PROPOSAL: N/A
Tests
3.1 Make sure it looks the same way as before and has quick reaction options in the list.
3.2 When you hover over the reaction you should see a small tooltip with reaction info.
3.3 Click on any reaction button in the menu , "👍" for example. The "👍" gets added as a reaction to the message.
When pressing the "👍" in the menu again, the reaction should be removed.
4.1 Add several reactions using quick reactions and Add Reactions button.
Offline tests
N/A
QA Steps
Same as in the 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
android1.mp4
Android: mWeb Chrome
android_web1.mp4
iOS: Native
ios1.mp4
iOS: mWeb Safari
ios_web1.mp4
MacOS: Chrome / Safari
web1.mp4
MacOS: Desktop
desktop1.mp4