-
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
Only add the new emojis to the frequent emojis list by doing a difference between former and new emojis #27687
Only add the new emojis to the frequent emojis list by doing a difference between former and new emojis #27687
Conversation
…ence between former and new emojis Signed-off-by: Pierre Michel <pmiche04@gmail.com>
@mananjadhav 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] |
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
@mananjadhav onInsertedEmoji is currently required so not passing it creates an error in the console, what should I do ?
|
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
@ShogunFire Best to remove the prop if not used anywhere else. Also we still have lint issues here. |
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Ok I removed it, I saw there was this issue #27579 about sending multiple calls to the API, right now my solution is sending the right numbers but multiple times, I will fix that |
…iSentMultipleTimes Signed-off-by: Pierre Michel <pmiche04@gmail.com> # Conflicts: # src/pages/home/report/ReportActionCompose/SuggestionEmoji.js # src/pages/home/report/ReportActionCompose/Suggestions.js
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
emojis.push(emoji); | ||
} | ||
} | ||
|
||
return emojis; | ||
} | ||
|
||
/** | ||
* Take the current emojis and the former emojis and return the emojis that were added, if we add an already existing emoji, we also return it |
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.
if we add an already existing emoji, we also return it
I didn't quite understand this part of the comment. Can you elaborate what do you mean here?
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 mean that if we had 😏 before and now we have 😏😏😏 we need to return two 😏 even if 😏 was present in the former list
@ShogunFire Can you complete the author checklist with the screencasts from all the platforms? |
Yes, I have a problem with executing ios but I will try to make it today |
@ShogunFire What's the latest update on this? |
@mananjadhav Sorry for the delay, I completed the checklist |
@@ -203,9 +209,13 @@ function ReportActionItemMessageEdit(props) { | |||
const {text: newDraft, emojis} = EmojiUtils.replaceAndExtractEmojis(newDraftInput, props.preferredSkinTone, props.preferredLocale); | |||
|
|||
if (!_.isEmpty(emojis)) { | |||
insertedEmojis.current = [...insertedEmojis.current, ...emojis]; | |||
debouncedUpdateFrequentlyUsedEmojis(); | |||
const newEmojis = EmojiUtils.getAddedEmojis(emojis, emojisPresentBefore.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.
Can we move this block to a util or an action? I can see the exact same thing repeated for ComposeWithSuggestions
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 am not sure how to do this cleanly with the debounce, also it was repeating before and a lot of code is repeating in those two files, can we keep it like this for now ?
@mananjadhav will you please take care of the checklist? @ShogunFire it looks like some conflicts popped up. |
Signed-off-by: Pierre Michel <pmiche04@gmail.com> # Conflicts: # src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js
Signed-off-by: Pierre Michel <pmiche04@gmail.com>
Reviewer Checklist
Screenshots/VideosWebweb-frequently-used-emojis.mp4Mobile Web - Chromemweb-chrome-frequently-used-emojis.movMobile Web - Safarimweb-safari-frequently-used-emojis.movDesktopdesktop-frequently-used-emojis.moviOSios-frequently-used-emojis.movAndroidandroid-frequently-used-emojis.movThanks for the PR and the patience here @ShogunFire. Tests well. @joelbettner All yours. 🎀 👀 🎀 C+ reviewed. |
@joelbettner looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
✋ 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/joelbettner in version: 1.3.81-0 🚀
|
🚀 Deployed to staging by https://github.com/joelbettner in version: 1.3.83-0 🚀
|
Details
We save the emojis present before to find out what emojis were actually added then we send that to the api
Fixed Issues
$ #27464
PROPOSAL: #27464 (comment)
Tests
Offline tests
Same tests
QA Steps
Same tests
### 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
2023-09-21.08-05-35.mp4
Mobile Web - Chrome
2023-09-21.08-22-27.mp4
Mobile Web - Safari
2023-09-24.18-47-50.mp4
Desktop
2023-09-24.18-51-28.mp4
iOS
2023-09-24.18-41-41.mp4
Android
2023-09-21.09-29-09.mp4