Skip to content
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 2024-03-11] [$500] Chat - Popup window appears that can't close tapping outside #32610

Closed
6 tasks done
lanitochka17 opened this issue Dec 7, 2023 · 76 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Design Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 7, 2023

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: 1.4.9-1
Reproducible in staging?: Y
Reproducible in production?: N
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

Precondition: use an account you haven't logged in with yet today

  1. Go to URL https://staging.new.expensify.com/
  2. Login -> popup appears, sometimes it appears when going through the app or login via Apple/Gmail
  3. Click outside the popup

Expected Result:

The popup closes by tapping outside & focus mode is enabled based on - https://expensify.slack.com/archives/C01SKUP7QR0/p1701987845872109?thread_ts=1701982931.866569&cid=C01SKUP7QR0

About this popup: it has an nvp. it can only be triggered once. anyone with 30 or more chats is the trigger.

Actual Result:

The popup doesn't close
Focus mode activates automatically

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6303868_1701912055194!image__192_

Bug6303868_1701912055210.Record_2023-12-07-02-32-11_4f9154176b47c00da84e32064abf1c48.mp4
Bug6303868_1701912055198.bandicam_2023-12-07_02-40-10-498.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e281391727f24e86
  • Upwork Job ID: 1734278720260624384
  • Last Price Increase: 2023-12-18
  • Automatic offers:
    • neonbhai | Contributor | 28064527
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Dec 7, 2023
Copy link
Contributor

github-actions bot commented Dec 7, 2023

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Dec 7, 2023

Triggered auto assignment to @marcaaron (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@marcaaron
Copy link
Contributor

I think it can't really be a blocker really because it's a new feature in any case.

If there is an existing modal that won't close - let's look into it, but otherwise, not a blocker IMO.

@marcaaron marcaaron removed the DeployBlockerCash This issue or pull request should block deployment label Dec 7, 2023
@marcaaron
Copy link
Contributor

Woops sorry I meant to just remove the blocker. We could fix this, but it's a low priority thing.

@marcaaron marcaaron reopened this Dec 7, 2023
@marcaaron marcaaron removed the Hourly KSv2 label Dec 7, 2023
@marcaaron marcaaron removed their assignment Dec 7, 2023
@marcaaron marcaaron added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. and removed Engineering labels Dec 7, 2023
Copy link

melvin-bot bot commented Dec 7, 2023

Triggered auto assignment to @Christinadobrzyn (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Copy link

melvin-bot bot commented Dec 7, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@Pujan92
Copy link
Contributor

Pujan92 commented Dec 7, 2023

@marcaaron Isn't this intended where the user has to click on the Got it button to close the modal as it is not a kind of confirmation modal bcoz we already switched to the focus mode?

Otherwise to fix we just need to provide onCancel to the ConfirmModal in the FocusModeNotification component which will call User.clearFocusModeNotification to close the modal.

@marcaaron
Copy link
Contributor

@marcaaron Isn't this intended where the user has to click on the Got it button to close the modal as it is not a kind of confirmation modal bcoz we already switched to the focus mode?

Not sure I understood you, sorry. I think that tapping outside the modal should dismiss it. It's just not a deploy blocker. Thanks!

@mkhutornyi
Copy link
Contributor

Proposal

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

FocusModeNotification modal doesn't dismiss when tap outside

What is the root cause of that problem?

There's no onCancel callback which is triggered when tap outside

<ConfirmModal
title={translate('focusModeUpdateModal.title')}
confirmText={translate('common.buttonConfirm')}
onConfirm={User.clearFocusModeNotification}
shouldShowCancelButton={false}
prompt={

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

define onCancel same as onConfirm

     onCancel={User.clearFocusModeNotification} 

@Pujan92
Copy link
Contributor

Pujan92 commented Dec 7, 2023

Ok, I thought the user needed to compulsorily press the button to proceed with this acceptance modal and it should not close on backdrop click.

@Pujan92
Copy link
Contributor

Pujan92 commented Dec 7, 2023

Proposal

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

Modal is not dismissing on outside click for focus modal

What is the root cause of that problem?

We have not provided the logic for onCancel for the ConfirmModal.

<ConfirmModal
title={translate('focusModeUpdateModal.title')}
confirmText={translate('common.buttonConfirm')}
onConfirm={User.clearFocusModeNotification}
shouldShowCancelButton={false}
prompt={

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

  1. Remove shouldShowCancelButton to show cancel button
    shouldShowCancelButton={false}
  2. Add/update confirmText, cancelText to correct text for those buttons('Try It' and 'No Thanks' in lang files)
  3. Add onCancel prop which will call User.clearFocusModeNotification which closes the modal
  4. Create new function for onConfirm which will update the priority mode and close the modal
const confirm = () => {
      User.updateChatPriorityMode(CONST.PRIORITY_MODE.GSD, true);
      User.clearFocusModeNotification();
}

onConfirm={confirm}
onCancel={User.clearFocusModeNotification}
  1. Remove below effect of automatic updating to focus mode
    useEffect(() => {
    User.updateChatPriorityMode(CONST.PRIORITY_MODE.GSD, true);
    }, []);
  2. Pass modal header image to ConfirmContent and based on its availability condition render it here to avoid margin.
    return (
    <View style={[styles.m5, ...props.contentStyles]}>
Result Screenshot 2023-12-12 at 15 52 39

@Christinadobrzyn
Copy link
Contributor

I can reproduce this, I think we should just fix this since it's not related to any other #focus mode GHs and if we want to keep the popup, we should just make it work now.

Asking how we want this popup to work - https://expensify.slack.com/archives/C01SKUP7QR0/p1701982931866569

@Christinadobrzyn
Copy link
Contributor

It sounds like the behaviour is:

  1. They click "Got it" on the popup window and focus is enabled
  2. We build a way for them to dismiss the popup (by clicking outside it) but #focus mode will still be enabled.

Because the behaviour will be the same if they dismiss the pop-up or click "Got it" - we should force them to click "Got it" as an attempt to get them to read about #focus mode.

So let's do nothing here and come back to this if we want to change it.

@mallenexpensify
Copy link
Contributor

I don't think the default here should be that, if you click the only green button or outside the box, that the behaviour changes? The default should be 'shit doesn't change' unless you actively, actually click something that clearly states you want to make the change (which i don't think is what we're doing here, right?)

@melvin-bot melvin-bot bot added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor labels Jan 4, 2024
Copy link

melvin-bot bot commented Jan 4, 2024

Current assignee @rushatgabhane is eligible for the Internal assigner, not assigning anyone new.

@neonbhai
Copy link
Contributor

neonbhai commented Jan 4, 2024

Raising PR shortly

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 5, 2024
@GabiHExpensify GabiHExpensify removed the Waiting for copy User facing verbiage needs polishing label Jan 12, 2024
@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Jan 29, 2024
Copy link

melvin-bot bot commented Jan 29, 2024

This issue has not been updated in over 15 days. @GabiHExpensify, @luacmartins, @rushatgabhane, @Christinadobrzyn, @neonbhai, @dubielzyk-expensify 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!

@neonbhai
Copy link
Contributor

working on the PR, finalizing soon!

@rushatgabhane
Copy link
Member

rushatgabhane commented Feb 4, 2024

@neonbhai do you need any help? Could you please move forward the PR #34069 (review)

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels Mar 4, 2024
@melvin-bot melvin-bot bot changed the title [$500] Chat - Popup window appears that can't close tapping outside [HOLD for payment 2024-03-11] [$500] Chat - Popup window appears that can't close tapping outside Mar 4, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 4, 2024
Copy link

melvin-bot bot commented Mar 4, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Mar 4, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.46-2 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 2024-03-11. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Mar 4, 2024

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:

  • [@rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
  • [@rushatgabhane] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@rushatgabhane] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@rushatgabhane] Determine if we should create a regression test for this bug.
  • [@rushatgabhane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 11, 2024
@rushatgabhane
Copy link
Member

  1. The PR that introduced the bug has been identified. Link to the PR: new feature

  2. The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N.A.

  3. A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N.A.

  4. Determine if we should create a regression test for this bug. Yes

  5. If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again

    1. Login to an account that has more than 200 chats so that you see focus modal prompt.
    2. Verify that you see an illustration in the modal.

@rushatgabhane
Copy link
Member

rushatgabhane commented Mar 11, 2024

@Christinadobrzyn could you please attach payment summary. thanks 🙇

@rushatgabhane
Copy link
Member

money request here - https://staging.new.expensify.com/r/7597420492097120

@Christinadobrzyn
Copy link
Contributor

Payouts due:

Contributor: $500 @neonbhai (paid in Upwork - https://www.upwork.com/nx/wm/workroom/35959554/overview)
Contributor+: $500 @rushatgabhane (in NewDot)

Upwork job is here.

Regression test posted - https://github.com/Expensify/Expensify/issues/377899

Closing!

@JmillsExpensify
Copy link

$500 approved for @rushatgabhane based on summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Design Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests