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

Make it harder to forget to submit targets/filters subform #2634

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

charliepark
Copy link
Contributor

Summary: This PR makes it harder to accidentally drop firewall targets/filters when creating/editing a firewall.

Context: It is not uncommon that a user trying to set up a new firewall rule will accidentally submit the overall form without having fully submitted sub-elements — the target, port filter, or host filter — within the form. You can imagine a user having filled in the Targets part of the form below, then moving their attention to Filters (and beyond), not knowing that they haven't actually added the target to their firewall rule:
Screenshot 2025-01-06 at 1 59 55 PM

This PR updates the firewall rules form so that if any of the three subforms have data entered-but-not-submitted, the overall form has its submit function disabled, with copy in a tooltip that directs the user to the appropriate spot on the form
Screenshot 2025-01-06 at 2 03 40 PM

Still writing a few tests for it.

Closes #2627

Copy link

vercel bot commented Jan 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Jan 7, 2025 2:09am

@benjaminleonard
Copy link
Contributor

What if instead of disabling the form completely we require a confirmation press? Like "You have an unsaved target entry, are you sure you want to continue?". The design would require a little work.

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.

Make it harder to forget to submit targets/filters subform
2 participants