feat(admin): footer record actions, deletable flag, mail row states and diff styles

- FormView footer RecordActions when there is no preview; meta.deletable hides Delete
- Partial fields reload after save and record actions; customized/outdated badges
- .summer-diff kit and docs for codeeditor, mailpreview and footer actions

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-13 13:37:55 +01:00
parent aba512800e
commit d13340672f
9 changed files with 155 additions and 25 deletions

View File

@@ -66,6 +66,10 @@ As in WinterCMS, a shortcut presses a button on the screen. Ctrl and Cmd are bot
A shortcut does what its button does, and nothing while the button is disabled (while saving, while loading, with an upload in progress). The save keys also work while typing in a field, a code field or the rich editor. There, on a record form, Ctrl+Enter saves and closes instead of inserting a line break (Shift+Enter still does), and on a create form Ctrl+Shift+S creates and starts a new record instead of toggling strikethrough; this is a known trade-off. Ctrl+S never opens the browser's Save page dialog.
The `codeeditor` field (CodeMirror 6) keeps the same model: Tab is not bound to indent, so focus leaves the editor; Mod+S and Mod+Enter still save the form; Esc does not cancel while the caret is in the editor. A load failure falls back to a monospace textarea that still saves.
The `mailpreview` field posts the unsaved draft to `POST /mail/preview` and shows the server HTML in a sandboxed iframe (`sandbox=""` with `srcdoc` only). **Send test to me** posts the same draft to `POST /mail/test-send` with no recipient; a 429 disables the button for `Retry-After` seconds.
Esc, / and ? do nothing while typing in a field, or while a dialog, popover or menu is open; those close on Esc themselves. When a dialog with a form is open (a related record, a pivot, the record picker, file details, a new API token), Ctrl+S and Ctrl+Enter submit that dialog and never the form underneath. Settings forms and My account have no unsaved-changes question, so Esc does not leave them. Save buttons show their shortcut in their tooltip.
## Types from OpenAPI