Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.32k stars 2.76k forks source link

[$250] Composer - Composer box is refocused when Copying Link on Web and Desktop #45204

Open lanitochka17 opened 2 months ago

lanitochka17 commented 2 months ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.6-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): applausetester+en@applause.expensifail.com Issue reported by: Applause - Internal Team

Issue found when executing PR https://github.com/Expensify/App/pull/44399

Action Performed:

  1. Right click on a message (in web or desktop)
  2. Select copy to clipboard

Expected Result:

User doesn't expect the composer to get refocused.

Actual Result:

The composer is refocused.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/04a02f66-9bc9-42f3-a9c9-c0ae026f953c

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a3374b61f565b9cf
  • Upwork Job ID: 1811154850298352037
  • Last Price Increase: 2024-09-11
Issue OwnerCurrent Issue Owner: @situchan
nkdengineer commented 1 month ago

Pass isComposerFocused param as ReportActionComposeFocusManager.isJustBlured(new Date().getTime()) || ReportActionComposeFocusManager.isFocused() when we open the context menu here.

Updated proposal a bit in step 6 to work for native.

situchan commented 1 month ago

@nkdengineer can you please update your test branch to reflect latest proposal?

nkdengineer commented 1 month ago

@situchan I updated.

melvin-bot[bot] commented 1 month ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] commented 1 month ago

@lschurr @srikarparsi @situchan this issue is now 4 weeks old, please consider:

Thanks!

situchan commented 1 month ago

still evaluating proposed solution

situchan commented 1 month ago

function isJustBlured(time: number) { return time - (composerBluredTime ?? 0) <= 100; }

Isn't there any better approach rather than 100 timeout?

nkdengineer commented 1 month ago

@situchan I can't find a better solution because when we open the context menu the composer is blurred before the context menu is opened.

melvin-bot[bot] commented 1 month ago

@lschurr, @srikarparsi, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

lschurr commented 1 month ago

Any update @situchan?

situchan commented 1 month ago

Not overdue

situchan commented 1 month ago

I think we're waiting for better solution without using timeout

melvin-bot[bot] commented 4 weeks ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] commented 3 weeks ago

@lschurr, @srikarparsi, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

lschurr commented 3 weeks ago

Any update on this one @situchan? Are we waiting for new proposals?

situchan commented 3 weeks ago

Any update on this one @situchan? Are we waiting for new proposals?

yes

melvin-bot[bot] commented 3 weeks ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] commented 3 weeks ago

@lschurr, @srikarparsi, @situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

situchan commented 3 weeks ago

Awaiting more proposals

wildan-m commented 2 weeks ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Composer box refocuses when copying link on web and desktop.

What is the root cause of that problem?

We call focus after the contextmenu modal closed

            hideContextMenu(true, ReportActionComposeFocusManager.focus);

What changes do you think we should make in order to solve the problem?

This solution does not meet the latest expected behavior; however, we can simply remove the ReportActionComposeFocusManager.focus callback from all desired menu items in ContextMenuActions if we do not want to re-focus on all platforms.

I doubt we can capture the focus state before opening the context menu.

change
src/pages/home/report/ContextMenu/ContextMenuActions.tsx

hideContextMenu(true, ReportActionComposeFocusManager.focus);

to:

hideContextMenu(true);

What alternative solutions did you explore? (Optional)

N/A

lschurr commented 2 weeks ago

Could you review the recent proposal @situchan?

situchan commented 2 weeks ago

reviewing latest proposal

melvin-bot[bot] commented 2 weeks ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

situchan commented 2 weeks ago

@wildan-m just to clarify: your proposal always not focus regardless of previously focused state, right?

wildan-m commented 2 weeks ago

@situchan yes, in case we want to change the behavior that way

situchan commented 2 weeks ago

Let's see if we can get more proposals which meet the agreed behavior.

melvin-bot[bot] commented 1 week ago

@lschurr, @srikarparsi, @situchan Eep! 4 days overdue now. Issues have feelings too...

lschurr commented 1 week ago

Still looking for proposals

melvin-bot[bot] commented 1 week ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

situchan commented 1 week ago

Not overdue

mvtglobally commented 4 days ago

Issue not reproducible during KI retests. (First week)

lschurr commented 3 days ago

Hey @situchan - Are you able to reproduce this one still?

melvin-bot[bot] commented 2 days ago

@lschurr, @srikarparsi, @situchan Eep! 4 days overdue now. Issues have feelings too...

situchan commented 2 days ago

OP is outdated. This is final expected behavior.

situchan commented 2 days ago

still reproducible on v9.0.31-22

https://github.com/user-attachments/assets/ebdfcd8d-37cd-48dc-b3fa-3eef9b7d2880

melvin-bot[bot] commented 1 day ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸