-
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 2023-10-23][$500] Chat - App refocuses on composer even when RHN is open #28926
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01a7a9e4d7988e32e2 |
Triggered auto assignment to @peterdbarkerUK ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
Can't reproduce :/ |
ProposalPlease re-state the problem that we are trying to solve in this issue.App focuses back on composer even if RHN is open on copy link from app download link in about settings What is the root cause of that problem?In here, after copying the link, we're always refocusing on the composer, even in the case where another route is open. What changes do you think we should make in order to solve the problem?In there, we should check that the active route is the report route, if yes we trigger the refocusing. For example, we can do something like this
(This can be checked here or inside What alternative solutions did you explore? (Optional)This might happen for other opened context menu as well, we should double check and fix the same for those places. |
Any updates? |
📣 @chahedmoetaz! 📣
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat - App refocuses on composer even when RHN is open What is the root cause of that problem?After press copy a link from context menu item the current implement alway focus to composer at App/src/pages/home/report/ContextMenu/ContextMenuActions.js Lines 153 to 156 in 7bd5233
What changes do you think we should make in order to solve the problem?The focus behavior should be handle base on a use case.
const payload = {
reportAction,
reportID: props.reportID,
draftMessage: props.draftMessage,
selection: props.selection,
+ isFocusComposeAfterSelect: props.isFocusComposeAfterSelect,
close: () => setShouldKeepOpen(false),
openContextMenu: () => setShouldKeepOpen(true),
interceptAnonymousUser,
};
.....
const [isChatPinned, setIsChatPinned] = useState(false);
+ const [isFocusComposeAfterSelect, setIsFocusComposeAfterSelect] = useState(false);
.....
* @param {Boolean} isUnreadChat - Flag to check if the chat is unread in the LHN. Used for the Mark as Read/Unread action
+ * @param {Boolean} isFocusCompose - Flag to check auto focus compose after action press
isUnreadChat = false,
+ isFocusCompose = true,
.....
setHasUnreadMessages(isUnreadChat);
+ setIsFocusComposeAfterSelect(isFocusCompose);
.....
isUnreadChat={hasUnreadMessages}
+ isFocusComposeAfterSelect={isFocusComposeAfterSelect}
onPress: (closePopover, {selection, isFocusComposeAfterSelect}) => {
console.log(`___________ isFocusComposeAfterSelect ___________`,isFocusComposeAfterSelect)
Clipboard.setString(selection);
hideContextMenu(true, isFocusComposeAfterSelect ? ReportActionComposeFocusManager.focus : undefined);
},
onSecondaryInteraction={(e) =>
ReportActionContextMenu.showContextMenu(
CONTEXT_MENU_TYPES.LINK,
e,
item.link,
popoverAnchor,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
undefined,
false
)
} Nice to have we can cleanup function ReportActionContextMenu.showContextMenu({
type: CONTEXT_MENU_TYPES.LINK,
event: e,
selection: item.link,
contextMenuAnchor: popoverAnchor,
isFocusCompose: false
}) Demonstrate my change 28926.mp4What alternative solutions did you explore? (Optional) |
I wonder if the intention here is that the RHN should close upon copy-to-clipboard, and focus correctly returns to the composer. That makes more sense for me, as a user has already retrieved the link and would now want to navigate elsewhere. Asked in slack! |
I was wrong, bug is correct as written - @mananjadhav could you take a look at the proposals here? Thanks! |
Based on the expected behavior @dukenv0307's proposal looks good. 🎀 👀 🎀 C+ review. |
Triggered auto assignment to @luacmartins, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I agree that @dukenv0307's proposal is good. Assigning to the issue. |
📣 @mananjadhav Please request via NewDot manual requests for the Reviewer role ($500) |
📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
📣 @dhanashree-sawant 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-23. 🎊 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:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-23. 🎊 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:
|
Summarizing payouts for this issue: Issue reporter: @dhanashree-sawant $50 Contributor: @dukenv0307 $750 (inc urgency bonus) Contributor+: @mananjadhav $750 (inc urgency bonus) - @mananjadhav please complete the above checklist, notify me here, and then request payment via NewDot. |
I think this change exists since a long time. I couldn't pinpoint it to a specific PR. Neither do I think we need a regression test for this one. We've anyway fixed this at the Composer level, so less likely to occur again. cc - @peterdbarkerUK |
$750 payment approved for @mananjadhav based on summary above. |
Just pending payment. |
@peterdbarkerUK Is the payout done for @dukenv0307 @dhanashree-sawant ? If yes then we're good to close here. |
Just pending confirmation for the above |
Yep, they were both paid last week! Job removed and closing :) I'm sorry for the slow followup while I was OoO last week. |
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:
App should not focus back on composer if RHN is open
Actual Result:
App focuses back on composer even if RHN is open on copy link from app download link in about settings
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.78.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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
mac.chrome.desktop.composer.refocus.on.open.RHN.mov
windows.chrome.composer.focus.copy.link.about.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696495147575079
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: