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

[$500] IOU - "Save" button is shown before the "Delete" popup appears #33473

Closed
5 of 6 tasks
lanitochka17 opened this issue Dec 22, 2023 · 14 comments
Closed
5 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 22, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.15.1
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Do a "Distance" request with stops
  3. Delete one of the stops

Expected Result:

The "Save" button shouldn't be visible while deleting a stop

Actual Result:

The "Save" button is displayed simultaneously with other buttons

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence

Bug6323301_1703199562521.VBXF9985.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018490ade582580d49
  • Upwork Job ID: 1737994498107367424
  • Last Price Increase: 2023-12-22
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 22, 2023
@melvin-bot melvin-bot bot changed the title IOU - "Save" button is shown before the "Delete" popup appears [$500] IOU - "Save" button is shown before the "Delete" popup appears Dec 22, 2023
Copy link

melvin-bot bot commented Dec 22, 2023

Job added to Upwork: https://www.upwork.com/jobs/~018490ade582580d49

Copy link

melvin-bot bot commented Dec 22, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 22, 2023
Copy link

melvin-bot bot commented Dec 22, 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

Copy link

melvin-bot bot commented Dec 22, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External)

@abzokhattab
Copy link
Contributor

abzokhattab commented Dec 22, 2023

Proposal

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

"save" button is visible when "delete stop" dialog is enabled

What is the root cause of that problem?

we dont hide the save button on opening the delete dialog

https://github.com/Expensify/App/blob/main/src/pages/iou/request/step/IOURequestStepWaypoint.js#L209-L219

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

we can add isSubmitButtonVisible and make it only visible if the delete stop is not visible using the existing isDeleteStopModalOpen state

      <FormProvider
                    style={[styles.flexGrow1, styles.mh5]}
                    formID={ONYXKEYS.FORMS.WAYPOINT_FORM}
                    enabledWhenOffline
                    validate={validate}
                    onSubmit={submit}
                    shouldValidateOnChange={false}
                    shouldValidateOnBlur={false}
                    submitButtonText={translate('common.save')}
                    isSubmitButtonVisible={!isDeleteStopModalOpen}
                >

Alternative solution

or we can keep the "delete waypoint" popover menu as open after clicking on the menu item so that it doesnt disappear (therefore the save button will not appear)

to do that we can add a new prop to the HeaderWithBackButton that would keep the three dot menu open after.selecting an item then this prop should be passed to the ThreeDotsMenu component and then used here

@neonbhai
Copy link
Contributor

neonbhai commented Dec 22, 2023

Proposal

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

IOU - "Save" button is shown before the "Delete" popup appears

What is the root cause of that problem?

This happens as there there is a delay between the popover hiding and the ConfirmModal showing in WaypointEditor.js. The delay is there to make sure there are no animation bugs.
But between animations we can see the save button which is confusing to the user.

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

We can add a useQuickAnimaton prop making the popover close quickly, so the effect is less noticable

Alternatively

We can hide the submit button using onThreeDotsButtonPress, and then show it again when modal hides using the prop onModalHide.

We currently don't have the ability to pass a function to HeaderWithBackButton to be executed when Popover Closes.
To take the case where user opens the popover, but closes it without opening modal, we will add an optional prop called onThreeDotsMenuHide to enable the submit button to show again

@rushatgabhane
Copy link
Member

do nothing because i don't think this is an issue

@Aaslan01
Copy link

Please re-state the problem that we are trying to solve in this issue.
IOU - "Save" button is shown before the "Delete" popup appears

What is the root cause of that problem?
First of all, this isn’t the issue, it's the component's hide and show time, you hide the first popup and the mean time popup another, this is the Delay of Components.

What changes do you think we should make in order to solve the problem?
I think you using RBSheet in the App so I would go for the first open 2nd Sheet, and behind with serTimeOut we will close the 1st sheet.

What alternative solutions did you explore? (Optional)
(Must Work) with props showSaveButton we can handle it in one way or another but it will work,

Copy link

melvin-bot bot commented Dec 22, 2023

📣 @Aaslan01! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@fedirjh
Copy link
Contributor

fedirjh commented Dec 23, 2023

cc @peterdbarkerUK This seems like the expected behaviour. should we change that?

@Aaslan01
Copy link

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link: https://www.upwork.com/freelancers/~018a6da599ca8c9fae

Copy link

melvin-bot bot commented Dec 24, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@melvin-bot melvin-bot bot added the Overdue label Dec 25, 2023
Copy link

melvin-bot bot commented Dec 26, 2023

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

@peterdbarkerUK
Copy link
Contributor

Yeah I think this is working as intended - the save button does get blocked when the deletion confirmation box comes up. It feels like a step too many to hit a 3 dot menu, select delete from a list of one, and then. confirm the deletion, but that's not a bug.

Closing, please LMK if you disagree!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

7 participants