Danny White and Joshen Lim
8a5ad58f81
chore(studio): replace CloseConfirmationModal with DiscardChangesConfirmationDialog ( #43430 )
...
## What kind of change does this PR introduce?
Form handling improvement.
## What is the current behavior?
https://github.com/supabase/supabase/pull/43201/ standardised our
discard changes behaviour with a shared hook and
`DiscardChangesConfirmationDialog` component. But many forms and sheets
still:
1. Don’t have any Discard-confirm close behaviour, making it too easy to
make accidental discards
2. Use a more complicated, manually-created `CloseConfirmationModal`
approach
## What is the new behavior?
- Replaced all instances of `#2` above that had `CloseConfirmationModal`
with `DiscardChangesConfirmationDialog` and its hook
- Improved design system documentation around dirty form dismissal
| Before | After |
| --- | --- |
| <img width="987" height="569" alt="Mercor Apexroles Foo
Supabase-9A40EC7C-F335-4B26-B567-450FC0845463"
src="https://github.com/user-attachments/assets/363bed82-34d2-4cc8-9164-6d18cfdbdbbc "
/> | <img width="987" height="569" alt="Mercor Apexroles Foo
Supabase-F427F1FA-DECC-4194-B663-A9E5A6F285A1"
src="https://github.com/user-attachments/assets/d49fafdc-a5c2-46df-9b67-ec42bacbe716 "
/> |
## To test
Try editing values these sheets in staging, then blurring the sheet or
pressing `esc`:
- CreateQueueSheet.tsx
- CronJobsTab.tsx
- CronJobPage.tsx
- EditWrapperSheet.tsx
- OverviewTab.tsx
- WrappersTab.tsx
- CreateFunction/index.tsx
- EditHookPanel.tsx
- TriggerSheet.tsx
- SidePanelEditor.tsx
- EditSecretSheet.tsx
- PolicyEditorModal/index.tsx
- PolicyEditorPanel/index.tsx
## Still to come
- [ ] Incrementally take on `#1`: implement
`DiscardChangesConfirmationDialog` and its hook in sheets or dialog
forms that have no dirty form dismissal handling
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com >
2026-03-06 03:17:35 +00:00
..
2024-05-23 17:39:56 +08:00
2025-12-05 02:11:16 +00:00
2025-12-10 08:05:30 +00:00
2024-05-24 09:21:41 +00:00
2026-02-24 16:14:03 +11:00
2026-02-27 16:23:08 +11:00
2024-05-24 09:21:41 +00:00
2026-02-25 16:27:48 +08:00
2025-12-10 08:05:30 +00:00
2025-12-17 11:24:36 +00:00
2025-12-17 11:24:36 +00:00
2025-12-17 11:24:36 +00:00
2025-12-17 11:24:36 +00:00
2026-02-05 13:54:10 +01:00
2024-09-30 21:41:26 +02:00
2024-09-30 21:41:26 +02:00
2024-05-23 17:39:56 +08:00
2025-12-02 11:15:50 +11:00
2024-05-23 17:39:56 +08:00
2025-12-02 11:15:50 +11:00
2026-02-05 13:54:10 +01:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2026-02-05 13:54:10 +01:00
2024-06-12 18:38:35 +08:00
2024-05-23 17:39:56 +08:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2024-06-12 18:38:35 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-08-30 16:51:05 +08:00
2024-08-30 16:51:05 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-09-02 09:54:06 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2024-07-16 14:14:03 -04:00
2025-12-17 11:24:36 +00:00
2024-05-23 17:39:56 +08:00
2025-12-15 10:44:08 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-12-15 10:44:08 +00:00
2025-12-15 10:44:08 +00:00
2025-12-15 10:44:08 +00:00
2025-12-15 10:44:08 +00:00
2026-02-05 13:54:10 +01:00
2026-02-20 14:10:13 +01:00
2026-02-05 13:54:10 +01:00
2025-10-16 13:44:40 +11:00
2025-10-16 13:44:40 +11:00
2025-10-16 13:44:40 +11:00
2025-10-16 13:44:40 +11:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-12-17 11:24:36 +00:00
2026-02-05 13:54:10 +01:00
2025-12-17 11:24:36 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-11-11 14:13:06 +11:00
2025-11-27 17:26:20 +08:00
2026-02-05 13:54:10 +01:00
2025-11-28 14:57:56 +08:00
2025-11-28 14:57:56 +08:00
2025-12-11 13:38:26 +11:00
2024-07-12 11:32:20 +02:00
2025-12-09 09:47:46 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-01-06 08:04:28 +10:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-24 09:40:15 +00:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-24 09:40:15 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-10-31 00:55:08 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2024-10-01 11:29:37 +02:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2025-12-10 13:10:18 +00:00
2024-05-23 17:39:56 +08:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2025-12-03 11:46:39 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-06-05 10:06:55 +00:00
2025-12-02 11:15:50 +11:00
2024-06-05 10:06:55 +00:00
2024-06-05 10:06:55 +00:00
2026-02-05 13:54:10 +01:00
2024-10-25 15:43:15 +02:00
2024-10-25 15:43:15 +02:00
2025-02-11 10:40:51 +08:00
2024-10-25 15:43:15 +02:00
2024-10-25 15:43:15 +02:00
2024-10-25 15:43:15 +02:00
2024-10-25 15:43:15 +02:00
2024-10-25 15:43:15 +02:00
2025-10-08 10:18:43 +11:00
2025-10-08 10:18:43 +11:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-11-11 04:02:30 +00:00
2025-12-01 16:51:34 +08:00
2025-12-02 14:18:21 +00:00
2026-02-05 13:54:10 +01:00
2025-11-27 15:38:10 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-01-21 10:18:15 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:44:45 +02:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:44:45 +02:00
2026-02-05 13:54:10 +01:00
2026-02-23 19:48:19 +01:00
2026-02-23 19:48:19 +01:00
2026-02-23 19:48:19 +01:00
2026-02-23 19:48:19 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-03-06 03:17:35 +00:00
2025-12-17 11:24:36 +00:00
2025-12-17 11:24:36 +00:00
2025-12-17 11:24:36 +00:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-07-19 12:38:42 +02:00
2024-07-19 12:38:42 +02:00
2024-08-31 07:50:51 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-12-11 13:38:26 +11:00
2025-12-11 13:38:26 +11:00
2025-12-11 13:38:26 +11:00
2025-12-11 13:38:26 +11:00
2026-01-20 03:24:10 +00:00
2026-01-20 03:24:10 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-12-17 11:24:36 +00:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2024-05-23 17:39:56 +08:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-01-20 22:23:45 +01:00
2026-02-05 13:54:10 +01:00
2026-02-05 13:54:10 +01:00
2025-03-31 11:58:01 +02:00
2025-03-31 11:58:01 +02:00
2025-12-02 14:18:21 +00:00
2025-12-02 14:18:21 +00:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2024-05-23 17:39:56 +08:00
2025-12-02 14:18:21 +00:00