Repository navigation
[6.x] Make the save and close keyboard shortcut consistent - #15619
Conversation
- Bind Cmd+S in the asset editor to save and close - Wait for save before navigating so the saved event isn't dropped - Don't close the editor when an asset is saved during navigation
- Guard next/previous against overlapping saves - Test navigation waits for save
- Cmd+S closes the child editor instead of the asset editor
|
Is this really what we want? Personally I'd expect cmd+s to "quick-save", i.e. just save and let you continue where you are. Don't close/navigate. (I know I just merged #15618 which closes the asset editor. Maybe hastily) |
|
Or maybe cmd+s to save and close when in a stack is intentional ux? |
|
@jasonvarga I think you may have misread - I'm going to look at all the shortcuts though, to make sure we're applying these consistently… |
…and-close-shortcut
- Asset editor: Cmd+S saves and stays open, Cmd+Shift+S saves and closes - Focal point and crop handle Cmd+Shift+S so it doesn't fall through to the asset editor - Inline user form: Cmd+Shift+S saves and closes, and its Cmd+S binding is now cleaned up on unmount - Save & Close tooltips on the asset editor, inline user and field settings primary buttons
…and-close-shortcut # Conflicts: # resources/js/components/assets/Editor/CropEditor.vue # resources/js/components/assets/Editor/Editor.vue # resources/js/components/assets/Editor/FocalPointEditor.vue # resources/js/tests/components/assets/Editor.test.js
|
OK I see now, #15618 results in I ran an audit on the whole CP, and this seems to be the pattern we should be following:
|
| Where | 6.x | Inconsistency | What this PR fixes |
|---|---|---|---|
Edit an entry with an Assets field → click an asset → edit Alt Text → cmd + s (same for Bard images and the asset browser) |
Saves & closes | Full stack editing something, so it should stay open | cmd + s saves and stays open; cmd + shift + s saves & closes; tooltip on Save |
Edit an entry with an Entries field → link an entry → click its title → edit a field → cmd + s |
Stays open | No cmd + shift + s, no tooltip on Save |
Adds cmd + shift + s to save & close; tooltip on Save |
Edit an entry with a Terms field → link a term → click its title → edit a field → cmd + s |
Stays open | No cmd + shift + s, no tooltip on Save |
Adds cmd + shift + s to save & close; tooltip on Save |
Edit an entry with a Users field → select a user → click their name → edit a field → cmd + s (needs an elevated session) |
Stays open | No cmd + shift + s, no tooltip on Save. After closing, cmd + s still goes to the closed user form |
Adds cmd + shift + s to save & close; tooltip on Save; cmd + s goes back to the entry after closing |
Edit a blueprint → click a top-level field → change Display → cmd + s |
Stays open; cmd + shift + s closes |
No tooltip on Save | Adds tooltip "Save & Close (Cmd+Shift+S)" on Save |
| Edit a blueprint → click a Replicator field → click a field inside one of its sets → hover Save All | Stays open; cmd + shift + s closes all |
Tooltip says just "Cmd+Shift+S", unlike the others | Tooltip now reads "Save All (Cmd+Shift+S)" |
Edit an asset → Focal Point or Crop → cmd + shift + s |
Nothing | No save & close shortcut | Focal point applies, saves & closes the asset editor; crop finishes the crop |
|
Thanks for the thoroughness here. You definitely nailed the convention. It's nice to have that be more conceptually consistent now. |
When you open a related entry or term from an Entries or Terms field, Cmd+S saves it but leaves the stack open. Field settings already use Cmd+Shift+S to save and close, so this brings the same shortcut to entries and terms opened in a stack.
To try it, open a related entry from an Entries field and press Cmd+Shift+S.