-
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
[HOLD for Payment 2024-09-6][$250] clicking enter on emoji selector for status results in leaving status pane #47272
Comments
Triggered auto assignment to @mallenexpensify ( |
Edited by proposal-police: This proposal was edited at 2024-08-12 23:02:25 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.clicking enter on emoji selector for status results in leaving status pane What is the root cause of that problem?Form is submitted because of enter press. App/src/pages/settings/Profile/CustomStatus/StatusPage.tsx Lines 167 to 176 in adaf5cd
What changes do you think we should make in order to solve the problem?We should check if the emoji picker is active or not and if it is we will disable press on enter. disablePressOnEnter={EmojiPickerAction.isEmojiPickerVisible()} What alternative solutions did you explore? (Optional)We can focus on the message input box when the modal hides.
onModalHide={() => {
inputRef.current?.focus();
}} What alternative solutions did you explore? (Optional 2)We can use useKeyboardShortcut(
CONST.KEYBOARD_SHORTCUTS.ENTER,
() => {
let indexToSelect = focusedIndex;
if (highlightFirstEmoji) {
indexToSelect = 0;
}
const item = filteredEmojis[indexToSelect];
if (!item) {
return;
}
if ('types' in item || 'name' in item) {
const emoji = typeof preferredSkinTone === 'number' && item?.types?.[preferredSkinTone] ? item?.types?.[preferredSkinTone] : item.code;
onEmojiSelected(emoji, item);
}
},
{isActive: !isEnterWhileComposition(keyBoardEvent), shouldPreventDefault: true, shouldStopPropagation: true},
); App/src/components/EmojiPicker/EmojiPickerMenu/index.tsx Lines 145 to 164 in 1eef411
|
Edited by proposal-police: This proposal was edited at 2024-08-13 04:48:25 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Emoji is not selected, and the RHP for status disappears What is the root cause of that problem?In
the disablePressOnEnter param is false by default.
When we open emoji picker then press on Enter, the
so the RHP is closed. What changes do you think we should make in order to solve the problem?When the emoji picker is showing, we shouldn't trigger
by adding an early return logic:
bellow:
What alternative solutions did you explore? (Optional)
|
Job added to Upwork: https://www.upwork.com/jobs/~01d3caa8f59dbe1758 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rayane-djouah ( |
Good catch @dylanexpensify I was able to reproduce. @rayane-djouah , plz review the proposals above. 2024-08-13_15-27-05.mp4 |
Proposal Updated
|
@Krishna2323 @daledah - Thank you for your proposals. Could you clarify why, on this page for example: https://staging.new.expensify.com/search/filters/category (using Screen.Recording.2024-08-14.at.2.14.11.PM.mov |
@rayane-djouah, I believe that's because on status page when we search for emoji, the emoji is just highlighted not focused. But on categories page the option is both focused and highlighted. |
@Krishna2323 How can we make the emoji focused to be selected correctly on enter key press instead of submitting the form? |
@rayane-djouah, I think my proposal has the simplest solution possible for this because if we try to focus emoji on text input change, the focus from the input will we removed on every character entered. You can try focusing on emoji by up/down arrow keys, you will notice the focus from input is removed. |
Proposal Updated
cc: @rayane-djouah |
@rayane-djouah, friendly bump for checking comments above ^ |
@Krishna2323 - I want to make sure we understand the root cause. Could you please explain why the |
@rayane-djouah, What I believe is happening is that in App/src/components/Button/index.tsx Lines 149 to 160 in 578006f
App/src/libs/KeyboardShortcut/index.ts Line 92 in 578006f
|
@Krishna2323's proposal looks good to me. I prefer using the 2nd alternative solution (using 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @carlosmiceli, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @rayane-djouah 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Deployed to production earlier today |
Note The production deploy automation failed: This should be on [HOLD for Payment 2024-09-6] according to #48221 prod deploy checklist, confirmed in #47761 (comment). |
Thanks @rayane-djouah , and for linking the deploy checklist too @rayane-djouah , you might know the answer here in the related Slack thread. |
@carlosmiceli, @mallenexpensify, @rayane-djouah, @Krishna2323 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Contributor: @Krishna2323 paid $250 via Upwork @rayane-djouah , can you also fill out the BZ checklist plz? thx BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Checklist
Regression Test Proposal
Do we agree 👍 or 👎 |
@mallenexpensify - Accepted the job and completed the checklist |
Thanks @rayane-djouah , I updated the comment above to denote you've been paid. Test Case is here |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.19-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @dylanexpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1723475125409519
Action Performed:
Expected Result:
emoji is selected and window for emoji search disappears
Actual Result:
emoji is not selected, and the RHP for status disappears
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Recording.435.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mallenexpensifyThe text was updated successfully, but these errors were encountered: