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

feat(v2): add navigation prompt modal when navigating away during submission download #4794

Merged

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Sep 5, 2022

Problem

This PR adds a modal that appears when a form admin attempts navigation (unmounting the download progress component) during a form download.

Also fixes a bug where the progress modal can be closed by the escape key. This should not happen and users should not be able to close the modal during downloads.

Closes #4144

Solution

Breaking Changes

  • No - this PR is backwards compatible

Features:

  • feat: replace usePrompt hook with NavigationPrompt component

Bug Fixes:

  • fix: prevent progress modal from being closed by escape key

Before & After Screenshots

Screenshot 2022-09-05 at 3 39 53 PM

Copy link
Contributor

@justynoh justynoh left a comment

Choose a reason for hiding this comment

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

lgtm

@karrui karrui merged commit 9d504c9 into form-v2/develop Sep 14, 2022
@karrui karrui deleted the form-v2/show-navigation-prompt-on-waiting-download branch September 14, 2022 08:41
@justynoh justynoh mentioned this pull request Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants