-
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
[HOLD for payment 2023-10-18] [$500] Web - Chat - Able to type in composer while popover is open #25485
Comments
Triggered auto assignment to @maddylewis ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - Chat - Able to type in composer while popover is open What is the root cause of that problem?
Currently, we only check What changes do you think we should make in order to solve the problem?The App/src/pages/home/report/ReportActionCompose.js Lines 712 to 715 in dd2c98b
If it's true, we should return false for that function too. Then in the keypress listener, it will early exit because the composer is not visible here |
@hoangzinh your proposal makes sense but unfortunately it might cause regression of not being able to paste even when composer is focused, especially when LHN popover is open Screen.Recording.2023-08-18.at.6.13.17.PM.movSolution:
@maddylewis which option do you suggest? |
Job added to Upwork: https://www.upwork.com/jobs/~01fecf2f053b61b171 |
Current assignee @maddylewis is eligible for the External assigner, not assigning anyone new. |
Current assignee @aimane-chnaif is eligible for the External assigner, not assigning anyone new. |
thanks for jumping on this one @aimane-chnaif - i went ahead and assigned you to the issue since you were already reviewing the proposals. |
@aimane-chnaif - i think option 2 |
Thanks. So the expected behavior is:
And the fix should not break current behavior: when none of popover or RHP modal is open, typing anything should focus on composer automatically but not paste. |
okay, gotcha. how would you like to proceed? let me know if you would like me to update the OP with those details you outlined here #25485 (comment) |
sure, let's update OP so that contributors post/update their proposals correctly |
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - Chat - Able to type/paste in composer while popover is open What is the root cause of that problem?For typing problem: there is no check in checkComposerVisibility function that indicates if ReportActionContextMenu popover is open. What changes do you think we should make in order to solve the problem?Changes in ReportScreen.jsWe can create a new flag isReportActionContextMenuVisible with setter that can be accessed by children using ReportScreenContext.Provider Changes in ReportActionItem.jsIn showPopover function add these lines: // Hides older context menu when right-clicking on other action item
ReportActionContextMenu.hideContextMenu();
setIsReportActionContextMenuVisible(true); Also need to update toggleContextMenuFromActiveReportAction function to handle isReportActionContextMenuVisible state when closing popover: const toggleContextMenuFromActiveReportAction = useCallback(() => {
const activeReportAction = ReportActionContextMenu.isActiveReportAction(props.action.reportActionID);
setIsContextMenuActive(activeReportAction);
setIsReportActionContextMenuVisible(activeReportAction);
}, [props.action.reportActionID, setIsContextMenuVisible]); Changes in ComposerWithSuggestions.jsUpdate checkComposerVisibility function by adding isReportActionContextMenuVisible to condition: const {isReportActionContextMenuVisible} = useContext(ReportScreenContext);
const checkComposerVisibility = useCallback(() => {
const isComposerCoveredUp = EmojiPickerActions.isEmojiPickerVisible() || isMenuVisible || isReportActionContextMenuVisible || modal.isVisible;
return !isComposerCoveredUp;
}, [isReportActionContextMenuVisible, isMenuVisible, modal.isVisible]); Changes in Composer > index.jsAdd handlePaste function as dependency in last useEffect hook. Resultscreen-capture.1.webm |
📣 @bernisz! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
@maddylewis, @aimane-chnaif Whoops! This issue is 2 days overdue. Let's get this updated quick! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.80-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-18. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
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:
|
moving to daily since payments are coming up |
Payments
Contributor hired Oct 2. PR merged Oct 9. |
Upwork job price has been updated to $500 |
Okay, payments were sent. @aimane-chnaif - will you take a look at this checklist when you get a chance - thanks! #25485 (comment) |
@maddylewis was there any reason to lower the price? This GH was created and made external before announcement so I think original base price applies here. Also, eligible for bonus as PR was C+ approved in less than 2 days and no changes were requested |
Regression Test Proposal(web/desktop only)
|
my thinking there is that the proposal that was used, the review and implementation happened after the update was live. is that fair? lmk if that's not accurate. |
Another instance: |
Friendly bump @maddylewis for payment |
kk, ty for the breakdown @mkhutornyi. it sounds like i owe both @aimane-chnaif and @mkhutornyi an additional payment. can you clarify the urgency bonus? i have the following info - Contributor hired Oct 2 and PR merged Oct 9. |
@maddylewis yes eligible. Contributor hired on Oct 4 PR was approved in 42 hrs. And no changes requested before merge. |
Okay, sounds good! I sent both the Contributor and the C+ an additional $1k payment for this one. regression test steps added. closing! |
@maddylewis sorry I haven't received additional 1k yet. Can you please confirm once again? Sorry for inconvenience 🙏 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
When any popover is open, composer should be blurred and not able to type in composer
The fix should not break the current behavior (when none of the popover or RHP modal is open, typing anything should focus on the composer automatically but not paste)
Actual Result:
You're able to type via the composer
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.3.55-4
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
Notes/Photos/Videos: Any additional supporting documentation
Bug.mp4
Recording.5913.mp4
Expensify/Expensify Issue URL:
Issue reported by: @aimane
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691526238059509
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @maddylewisThe text was updated successfully, but these errors were encountered: