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

Intercept modal dismissal with unsaved changes #353

Conversation

aswallace
Copy link
Contributor

@aswallace aswallace commented Nov 26, 2024

Addresses two small requests for the editing modal:

  • Removes redundant tooltips from buttons
  • Adds a warning pop-up if user dismisses the modal after they've already entered annotation data
    • Warning logic needs to be global to the whole edit modal instead of just the form component because dismissing can mean clicking cancel, clicking the 'x' or just clicking outside of the modal
    • The pop-up currently only appears for the 'New annotation' pathway after a user enters data for the new ann. and clicks next (per discussion, anything before that is easy to re-enter so warning is not needed)
    • Uses show/hide with css instead of js conditionals since we need the rendered data to persist

closes #344

image

@aswallace aswallace self-assigned this Nov 26, 2024
@aswallace aswallace linked an issue Nov 26, 2024 that may be closed by this pull request
@aswallace aswallace merged commit 83f441d into feature/metadata-editing/develop Dec 4, 2024
7 checks passed
@aswallace aswallace deleted the feature/metadata-editing/warn-on-dismiss branch December 4, 2024 17:36
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.

Intercept onDismiss/exit in edit modal
3 participants