Open lanitochka17 opened 1 year ago
Triggered auto assignment to @MitchExpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)Composer Not focused when clicking on composer box
In the ReportActionItemMessageEdit component, we have a callback when Emoji picker modal is hidden, it will focus back to the editing report message https://github.com/Expensify/App/blob/34d4e54055c3fee2a04e2fc11af82fe454197ff9/src/pages/home/report/ReportActionItemMessageEdit.js#L379-L382
So even if we click focus on the main composer, by above callback, it will focus back to the editing report message
In the above onModalHide callback, we need to check if the main composer is focusing, we will early exit and won't focus back to the editing report message
Result:
https://github.com/Expensify/App/assets/9639873/f6070368-fc5f-484f-93b3-4327050d5076
Job added to Upwork: https://www.upwork.com/jobs/~0161d746e7dbb99cde
Current assignee @MitchExpensify is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (External
)
Composer Not focused when clicking on composer box
When Emoji picker modal is closed, it will focus back to the edit composer regardless of any user interaction:
So even if we click focus on the main compose, it will always focus back to the edit compose.
Update: As previously discussed here, we should move all ReportActionComposeFocusManager
-related codes out of the standalone Composer
.
Since PR https://github.com/Expensify/App/pull/24481, we have a way to re-focus on the "right" compose:
ReportActionFocusManager
will handle it. In ReportActionItemMessageEdit
:
onModalHide={() => {
ReportActionComposeFocusManager.focus();
}}
onComposerFocus
callback:
onFocus={() => {
...
ReportActionComposeFocusManager.onComposerFocus(() => {
if (!willBlurTextInputOnTapOutside) {
return;
}
focus(true);
});
}}
ReportActionComposeFocusManager.clear()
on unmountReportActionComposeFocusManager
-related codes out of the standalone Composer
OK. Thanks for the proposals. My intuition is asking to hold this issue as we have done for https://github.com/Expensify/App/issues/23403. Even though solutions might not overlap they seem quite related.
Also, I was checking on https://github.com/Expensify/App/pull/24481 and the implementation doesn't seem very scalable. This is out of the scope of this issue but we can pursue improving that as well.
Isn’t this an expected behaviour? When the EmojiPicker is displayed, we do not allow interactions with any other element in Report Screen until it is dismissed. A tap on anywhere else other than the EmojiPicker will hide and bring the focus back on the currently edited message input.
That was the behavior a few months back but it seems that it is recently changed. I am not sure where.
@parasharrajat do you still think this is the best course of action here?
My intuition is asking to hold this issue as we have done for https://github.com/Expensify/App/issues/23403.
The reason behind this is that a single PR caused these issues and C+ can pick a more complete solution in https://github.com/Expensify/App/issues/23403 to fix the issue completely. I am monitoring the review of the other issue. If it seems that we are not solving this issue there, I will continue here.
Does that sound good? or do you want me to continue on this issue?
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
I am monitoring the review of the other issue. If it seems that we are not solving this issue there, I will continue here.
This sounds great to me! Thank you
@parasharrajat As previously discussed here, I updated my proposal to refactor the ReportActionComposeFocusManager
codes. I've run through all test cases in related PRs: https://github.com/Expensify/App/pull/23258, https://github.com/Expensify/App/pull/24481 and https://github.com/Expensify/App/pull/23994 and it worked fine.
Sounds like @tienifr's proposal is updated and ready for you @parasharrajat
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Friendly bump on an update here @parasharrajat 👍
Bump @parasharrajat 🙇
Checking the current state as https://github.com/Expensify/App/issues/23403 is completed.
I couldn't reproduce this issue. cc; @MitchExpensify Can you try?
I can still reproduce it. Remember to keep the emoji picker open.
https://github.com/Expensify/App/assets/113963320/6c289de6-eff2-4255-9ee2-1206b5886b75
@parasharrajat @MitchExpensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
I can still reproduce @parasharrajat
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Ok, I will recheck it in sometime.
My proposal can fix this issue as well: https://github.com/Expensify/App/issues/27612.
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.
These lines will be changed with
onModalHide={() => {
InteractionManager.runAfterInteractions(() => {
if (EmojiPickerAction.isEmojiPickerVisible()) {
return;
}
ReportActionComposeFocusManager.focus();
});
}}
We need to use InteractionManager
, because user may open emoji picker while already open for another edit composer.
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. We will need to set ReportActionComposeFocusManager.onComposerFocus
because user may close emoji picker without focus on edit composer.
onPress={() => {
ReportActionComposeFocusManager.onComposerFocus(() => {
if (!textInputRef.current) {
return;
}
textInputRef.current.focus();
});
}}
Current action is setting ReportActionComposeFocusManager.onComposerFocus
on onFocus in Composer Component.
https://github.com/Expensify/App/blob/c77814fd5e643cba78e8c8294370d78f633a59c5/src/components/Composer/index.js#L471-L483
https://github.com/Expensify/App/assets/93402058/61304066-809e-4dd2-935d-e4607fd7af60
This approach is fixing this issue as well as fixing #27612.
@tienifr 's proposal looks good to me given that we are already following that pattern.
Apart from that, @tienifr will be doing this refactor https://github.com/Expensify/App/pull/24481#discussion_r1306638535.
:ribbon: :eyes: :ribbon: C+ reviewed
Triggered auto assignment to @johnmlee101, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
📣 @parasharrajat Please request via NewDot manual requests for the Reviewer role ($1000)
📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
📣 @daveSeife 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!
Investigated further and found several possible regressions. I think this would take more time to submit a complete PR.
@johnmlee101 @parasharrajat @MitchExpensify @tienifr this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:
Thanks!
Current assignee @parasharrajat is eligible for the Internal assigner, not assigning anyone new.
@johnmlee101, @parasharrajat, @MitchExpensify, @tienifr Huh... This is 4 days overdue. Who can take care of this?
@tienifr Any update?
@tienifr do you mind sharing a work-in-progress PR so we can stay up-to-date on progress you're making?
Some latest changes to the Composer component invalidate my former solution. I'm prioritizing this one.
@johnmlee101, @parasharrajat, @MitchExpensify, @tienifr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Whats the latest here @tienifr ?
Bump @tienifr
Implementation was done. Updating screenshots. Expect to open PR in the next hour. Hope that there's no breaking changes from main
.
PR is ready for review: https://github.com/Expensify/App/pull/28238.
This issue has not been updated in over 15 days. @johnmlee101, @parasharrajat, @MitchExpensify, @tienifr eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
@tienifr Waiting for your response on the PR.
Still waiting on update @tienifr
cc: @MitchExpensify
Prioritizing this now.
@johnmlee101, @parasharrajat, @MitchExpensify, @tienifr, this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.
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:
Clicking on the main composer box focuses the composer
Actual Result:
Clicking on the main composer box focuses on the main composer for a second and then focuses on the edit Composer
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.57-1
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/4769bf78-138c-49eb-b734-1a87ff23a738
https://github.com/Expensify/App/assets/78819774/1fb3cb4e-2436-41d7-9d85-2a2fa1a3b4e2
Expensify/Expensify Issue URL:
Issue reported by: @daveSeife
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692048812228079
View all open jobs on GitHub
Upwork Automation - Do Not Edit