-
Notifications
You must be signed in to change notification settings - Fork 13
Simpler nav guard for SideModalForm #2328
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This is great. Modal on top of modal is a little funny, but I can live with it, the QoL improvement is huge. Text is a little tight when there's only one line. Like a McDonald's hamburger, super thin patty. @benjaminleonard ? ![]() |
Before/after on overlay fix. Note how in the before, the background gets double-dark when the confirm modal opens. 2024-11-19-modal-hide-overlay.mp4 |
oxidecomputer/console@0517a28...6fe6936 * [6fe6936d](oxidecomputer/console@6fe6936d) oxidecomputer/console#2328 * [fcd34418](oxidecomputer/console@fcd34418) oxidecomputer/console#2563 * [6e389ec6](oxidecomputer/console@6e389ec6) oxidecomputer/console#2561 * [41c4c5db](oxidecomputer/console@41c4c5db) oxidecomputer/console#2560 * [92472558](oxidecomputer/console@92472558) oxidecomputer/console#2562 * [9b60d5c9](oxidecomputer/console@9b60d5c9) oxidecomputer/console#2559 * [1e0486c2](oxidecomputer/console@1e0486c2) chore: npm audit fix * [7d35d268](oxidecomputer/console@7d35d268) oxidecomputer/console#2544
oxidecomputer/console@0517a28...6fe6936 * [6fe6936d](oxidecomputer/console@6fe6936d) oxidecomputer/console#2328 * [fcd34418](oxidecomputer/console@fcd34418) oxidecomputer/console#2563 * [6e389ec6](oxidecomputer/console@6e389ec6) oxidecomputer/console#2561 * [41c4c5db](oxidecomputer/console@41c4c5db) oxidecomputer/console#2560 * [92472558](oxidecomputer/console@92472558) oxidecomputer/console#2562 * [9b60d5c9](oxidecomputer/console@9b60d5c9) oxidecomputer/console#2559 * [1e0486c2](oxidecomputer/console@1e0486c2) chore: npm audit fix * [7d35d268](oxidecomputer/console@7d35d268) oxidecomputer/console#2544
This adds a modal for the SideModalForm that protects it from getting accidentally closed when the form is dirty.
I had experimented with a more involved approach, using useBlocker, but as Crespo and I were talking through it, he noted that side modal forms don't always require a route change, so this is possibly both more reliable and simpler.
The deeper question: is the benefit of adding this bit of friction worth it? I'm leaning towards "yes", as the friction is pretty minimal and the potential for data loss is … low-to-moderate? … but am open to alternate takes.
Fixes #2186