-
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
[$1000] Web - On copy paste on workspace invite message page, app pastes text on compose box #23184
Comments
Triggered auto assignment to @johncschuster ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Copy-paste on the workspace invite page leads to the text being pasted in the compose box. What is the root cause of that problem?When pasting to the composer, it checks App/src/pages/home/report/ReportActionCompose.js Lines 703 to 706 in 0fcfe75
Normally, when a modal is open, this function blocks due to the However, when deleting a member in a workspace, you are presented with a confirmation modal asking you whether you're sure. When this modal closes, What changes do you think we should make in order to solve the problem?When closing a modal, we should not set What alternative solutions did you explore? (Optional)Option 1. For ensuring that the composer is visible, we can check that the active route is Option 2. When opening a modal, we determine the value of Option 3. We could set the |
ProposalPlease re-state the problem that we are trying to solve in this issue.Copy-paste on the workspace invite page leads to the text being pasted in the compose box. What is the root cause of that problem?After reload, composer gets App/src/pages/home/report/ReportActionCompose.js Lines 703 to 706 in 0fcfe75
when closing remove member Dialog, this.propos.modal.isVisible becomes to false.so composer gets the incorrect paste. What changes do you think we should make in order to solve the problem?When closing Modal, we should not set App/src/pages/workspace/WorkspaceMembersPage.js Lines 422 to 431 in fa473e9
we can add this ConfirmModal of WorkspaceMembersPage
What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.The issue here is that the paste command is not working when trying to paste into invite message after deleting a user. Investigation bugPasting.webmThus, the root cause should be fixing the whole pasting mechanism as it occurs in multiple instances of components. What is the root cause of that problem?The first thing I did is investigating the paste function, and I found that there was a global paste event listener which is always called and triggered when the component mount here: App/src/components/Composer/index.js Lines 176 to 178 in fa473e9
And will unmount here: App/src/components/Composer/index.js Line 210 in fa473e9
My first thought is that a general paste listener is not needed as we have handlePaste that will do the job, however, the issue here is if we delete the global pasting listener, this will not allow attachment or HTML pasting and they are handled differently. The root cause, then, is that we are making the listener global for the entire HTML document, which affects all elements/components of the page. Thus, we need to handle it specifically for the input we are dealing with: --> We need to use the textInput element istead of document where the listener then will be associated with only to the specific input! What changes do you think we should make in order to solve the problem?We need to change componentDidMount line: App/src/components/Composer/index.js Line 177 in fa473e9
to
and componentWillUnmount line: App/src/components/Composer/index.js Line 210 in fa473e9
To
What alternative solutions did you explore? (Optional)N/A |
it seems that this PR causes regression #21583 |
Heads up, @robertKozik |
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - On copy paste on workspace invite message page, app pastes text on compose box. What is the root cause of that problem?With normal flow, In What changes do you think we should make in order to solve the problem?I think we shouldn't rely on function isCPNRoute() {
const rootState = navigationRef.getRootState();
const lastRoute = _.last(rootState.routes);
return lastRoute.name === NAVIGATORS.CENTRAL_PANE_NAVIGATOR;
} Then change checkComposerVisibility() {
const isComposerCoveredUp = !Navigation.isCPNRoute() || EmojiPickerActions.isEmojiPickerVisible() || this.state.isMenuVisible
return !isComposerCoveredUp;
} What alternative solutions did you explore? (Optional)We can use |
thanks @johncschuster for mentioning. Looking into it as indeed it's regression |
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - user can paste into composer when RHN is open after deeplinking into this page What is the root cause of that problem?when accessing the page via deeplink, the Composer is not removing the What changes do you think we should make in order to solve the problem?I'm proposing to keep the checkComposerVisibility() {
const {reportID, isSubReportPageRoute} = ROUTES.parseReportRouteParams(Navigation.getActiveRoute());
const isComposerCoveredUp = EmojiPickerActions.isEmojiPickerVisible() || this.state.isMenuVisible || this.props.modal.isVisible || !reportID || isSubReportPageRoute;
return !isComposerCoveredUp;
} In addition to that I propose to move What alternative solutions did you explore? (Optional)N/A |
Job added to Upwork: https://www.upwork.com/jobs/~0105c6892023aa08e8 |
Current assignee @johncschuster is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
@parasharrajat do you agree with @robertKozik's proposal above, or do you think there are better/different ways we can resolve the issue? |
Hey @johncschuster! I hope you are doing good. I just want to make sure if you guys review all proposals above? Thank you! |
Reviewing proposals. Need to test a few things myself. Found the root cause #21583. |
Bump @Santhosh-Sellavel. |
This is fixed now, can you still reproduce this? |
This ends up as a duplicate as all share a common root cause. I'll post the next steps here, thanks! |
📣 @parasharrajat Please request via NewDot manual requests for the Reviewer role ($1000) |
📣 @Santhosh-Sellavel Please request via NewDot manual requests for the Contributor role ($1000) |
📣 @dhanashree-sawant 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
@Santhosh-Sellavel This issue also seems to be related - #23319 |
@johncschuster, @parasharrajat, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@Santhosh-Sellavel how's it going? Do you have next steps for us? |
Issue not reproducible during KI retests. (First week) |
@johncschuster @parasharrajat @Santhosh-Sellavel this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
It seems the issue is no longer reproducible. Holding. |
Just on hold, for now, discussion in Slack here |
Thanks for the heads up, @Santhosh-Sellavel! |
@johncschuster @parasharrajat @Santhosh-Sellavel 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! |
@johncschuster We decided not to revert the PR, so we can close this one and just issue reporting bonus here. As this one is already fixed. |
Payment has been issued to the bug reporter (@dhanashree-sawant). Closing! |
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 paste text in invite message field if we copy and paste text while invite message field is in focus
Actual Result:
App pastes the text in compose box when we reload on members page, remove 1 member and invite any other and reach invite message paste
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.42-18
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
invite.message.paste.in.compose.mp4
Recording.3757.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689703579147449
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: