Open lanitochka17 opened 1 year ago
Job added to Upwork: https://www.upwork.com/jobs/~016c6dc7febe9f77e8
Triggered auto assignment to @johncschuster (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)Triggered auto assignment to @sakluger (External
), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External
)
Chat - Edit composer is focused even if emoji picker is open
In the code, when the emoji picker hides, it directly sets the composer to be focused without checking if the emoji picker is currently visible.
We need to add a check for isEmojiPickerVisible
before focusing on the composer.
Updated code:
onModalHide={() => {
InteractionManager.runAfterInteractions(() => {
if (EmojiPickerAction.isEmojiPickerVisible() || ['TEXTAREA', 'INPUT'].includes(DomUtils.getActiveElement().nodeName)) {
return;
}
setIsFocused(true);
focus(true);
});
}}
https://github.com/Expensify/App/assets/85894871/8ba2aa3f-f8a5-4684-80d9-99eb4b26b254
Report Edit Message composer remains focused when emoji picker remains open.
The issue stems from the fact that closing the emoji picker sets the isFocused state to true, this remains true when opening the emoji picker of another edit box. https://github.com/Expensify/App/blob/c77814fd5e643cba78e8c8294370d78f633a59c5/src/pages/home/report/ReportActionItemMessageEdit.js#L411C1-L414C31
Set isFocusedRef.current
to false
if not it is not the active edit message box. Also to ensure that after selecting an emoji the current edit box becomes focused, we add focus(true)
at the end of the addEmojiToTextBox
handler.
onModalHide={() => {
if (!isFocusedRef.current) {
setIsFocused(false)
}
else {
setIsFocused(true);
focus(true);
}
}}
const addEmojiToTextBox = (emoji) => {
setSelection((prevSelection) => ({
start: prevSelection.start + emoji.length + CONST.SPACE_LENGTH,
end: prevSelection.start + emoji.length + CONST.SPACE_LENGTH,
}));
updateDraft(ComposerUtils.insertText(draft, selection, `${emoji} `));
focus(true)
};
📣 @tanerochris! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: tanejuth@gmail.com Upwork Profile Link: LINK
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
When emoji picker is closed, text input is focused even if it should not focus.
EmojiPickerButton Component's onModalHide property sets focus without any condition in ReportActionItemMessageEdit Component, when emoji picker is closed.
Instead of setting focus directly, we should use ReportActionComposeFocusManager. https://github.com/Expensify/App/blob/c77814fd5e643cba78e8c8294370d78f633a59c5/src/pages/home/report/ReportActionItemMessageEdit.js#L411-L414
These lines will be changed with
onModalHide={() => {
InteractionManager.runAfterInteractions(() => {
if (EmojiPickerAction.isEmojiPickerVisible()) {
return;
}
ReportActionComposeFocusManager.focus();
});
}}
New property 'onPress' will be added to EmojiPickerButton component. We will send a function for run on onPress. In this case, we will use it for set ReportActionComposeFocusManager.onComposerFocus function.
onPress={() => {
ReportActionComposeFocusManager.onComposerFocus(() => {
if (!textInputRef.current) {
return;
}
textInputRef.current.focus();
});
}}
Screencast for showing the bug is not just about changing emoji picker
https://github.com/Expensify/App/assets/93402058/8112d40f-6754-4385-bfed-f4bb0519599f
https://github.com/Expensify/App/assets/93402058/28ecafc6-a029-4c64-99d3-654da1cca983
📣 @ilkeruyanik! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: ilker.uyanik11@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~01c158240bd3a5fc99
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
I added a minor change to my proposal due to the another issue that has been highlighted by @ilkeruyanik but my solution is still different from other proposals. Added this comment to avoid confusions.
My proposal here https://github.com/Expensify/App/issues/25892#issuecomment-1694065191 can also solve this one. And I think it's the simplest one. There's no need to introduce new prop or use InteractionManager
again, just let ReportActionComposeFocusManager
and focusWithDelay
handle the work.
We might want to wait on #25892 if @tienifr's solution can solve both.
Sounds good! Let's bump this one to Weekly
while we wait.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Still holding on https://github.com/Expensify/App/issues/25892
Still holding
Still holding
Still holding
Still holding
Still holding
Still holding
Still holding
Triggered auto assignment to @abekkala (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
I will be OOO starting Monday, December 18, and will return Tuesday, January 2.
Current status: This issue is on hold for #25892
If this issue is open when I'm back from OOO, I'll take it back over. Thank you!
this is still on hold for 25892 - changing this to weekly as daily is not needed while on hold
Triggered auto assignment to @kevinksullivan (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
I was assigned as John's second person while he is ooo - however, I am also ooo. Johns status is here: https://github.com/Expensify/App/issues/27612#issuecomment-1858544587
This is on hold for #25892
@johncschuster, @eVoloshchak, @kevinksullivan Huh... This is 4 days overdue. Who can take care of this?
@johncschuster, @eVoloshchak, @kevinksullivan Still overdue 6 days?! Let's take care of this!
@johncschuster, @eVoloshchak, @kevinksullivan 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
@johncschuster, @eVoloshchak, @kevinksullivan 12 days overdue. Walking. Toward. The. Light...
Thanks for taking care of this while I was OOO @abekkala and @kevinksullivan. I'll take it back over.
Still on hold. Bumping to Weekly while we wait.
Still on hold for https://github.com/Expensify/App/issues/25892
Not overdue, still on HOLD for https://github.com/Expensify/App/issues/25892
Still on hold for https://github.com/Expensify/App/issues/25892
Not overdue, still on hold for https://github.com/Expensify/App/issues/25892
Still on hold
Still on hold
Still on hold. Also, I've filed this under #vip-vsb since it's related to chat.
Still on hold
https://github.com/Expensify/App/issues/25892 is still open, on HOLD
Still on hold
Still on hold
Still on hold
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Edit Composer should not be focused if emoji picker is displayed
Actual Result:
Edit Composer is focused if emoji picker is displayed
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.70-5
Reproducible in staging?: Yes
Reproducible in production?: Yes
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
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/78819774/488001a6-9f6b-4dca-9fea-af34e924bc14
https://github.com/Expensify/App/assets/78819774/592b30c0-8304-4af8-9846-efbf7ea68a69
Expensify/Expensify Issue URL:
Issue reported by: @krishna2323)
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694848738372809
View all open jobs on GitHub
Upwork Automation - Do Not Edit