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

Add browser unsaved changes modal when navigating from order summary page [OFN-11600] #12836

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

wandji20
Copy link
Contributor

@wandji20 wandji20 commented Sep 2, 2024

What? Why?

Show pop-in alert when navigating away from the summary page without placing an order

What should we test?

Navigating away from the order summary page will now show the default browser popup
With exceptions to

  1. Complete order button
  2. Edit order step (Customer details and Payment method)
  • Visit ... page.
    /checkout/summary

Release notes

Show pop-in alert when navigating away from the summary page without placing an order

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • Technical changes only

Dependencies

N/A

Documentation updates

N/A

Copy link
Collaborator

@chahmedejaz chahmedejaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wandji20! Thank you for working on this. I noticed a few minor issues that need attention. Could you please take a look when you have a moment? Thanks so much!

Edit:
The failing specs are unrelated.

app/webpacker/controllers/guest_checkout_controller.js Outdated Show resolved Hide resolved
app/webpacker/controllers/guest_checkout_controller.js Outdated Show resolved Hide resolved
app/webpacker/controllers/guest_checkout_controller.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@chahmedejaz chahmedejaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, thanks. 🎉

@rioug rioug self-requested a review September 3, 2024 23:41
@rioug rioug added the user facing changes Thes pull requests affect the user experience label Sep 3, 2024
Copy link
Collaborator

@rioug rioug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 , Thanks !

@sigmundpetersen sigmundpetersen changed the title Add browser unsaved changes modal when navigation form order sumary page [OFN-11600] Add browser unsaved changes modal when navigating from order summary page [OFN-11600] Sep 27, 2024
@filipefurtad0 filipefurtad0 self-assigned this Sep 27, 2024
@filipefurtad0 filipefurtad0 added pr-staged-fr staging.coopcircuits.fr pr-staged-au staging.openfoodnetwork.org.au and removed pr-staged-fr staging.coopcircuits.fr labels Sep 27, 2024
@filipefurtad0
Copy link
Contributor

Hey @wandji20 ,

I've verified that, when on the /summary page, both as guest and as logged user:

  • attempting to close the tab / browser or refreshing the page or clicking the logout button triggers the confirmation modal

image

The modal works as expected (confirming closes the page, refusing leave the page open)

  • browsing backwards does not trigger the confirmation modal

Looks great! Merging.

@filipefurtad0 filipefurtad0 merged commit 852dd41 into openfoodfoundation:master Sep 27, 2024
55 checks passed
@drummer83 drummer83 removed the pr-staged-au staging.openfoodnetwork.org.au label Sep 29, 2024
@drummer83
Copy link
Contributor

Removing the staged-AU label. I assume you're done here, @filipefurtad0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user facing changes Thes pull requests affect the user experience
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Show pop-in alert when navigating away from /summary page without placing order
6 participants