diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-17 11:34:07 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-17 11:34:07 +0200 |
| commit | 080d3d9aaffa8848d6de8546511f096d8e7c30f5 (patch) | |
| tree | 2663bd5c774d8db7fa024e82546f6cfa04c07e29 /desktop/README.md | |
| parent | b8c0f01f058c87db5924067dbb475aa241c71b46 (diff) | |
| download | quickshell-080d3d9aaffa8848d6de8546511f096d8e7c30f5.tar.gz quickshell-080d3d9aaffa8848d6de8546511f096d8e7c30f5.zip | |
settings: pages edit a draft, and Save writes it
The qtmaildir, Assistant and Ask presets pages wrote a field on Enter,
and a switch or chip the moment it was clicked, so a half-finished
change reached the file and a slip could not be taken back. They now
edit a draft as fields are typed, and a Save and Discard pair in the
page header (SaveBar, through Page.actions) writes or drops it. Save
waits while a field holds a value that cannot be written, and a draft
over a file that changed on disk meanwhile is refused at Save rather
than written over it. A dot in the sidebar marks a page with unsaved
edits; drafts survive moving between pages. The four Mail pages share
one draft, since they are one file. Tool switches are staged too and
renamed on Save; model Load, Prefer and Restart stay immediate, being
actions rather than settings.
Live editing needed two rules. A field is no longer bound to its value,
which would reset the cursor and eat a typed trailing space; it follows
the value only when the draft moves under it. And a Repeater's model is
now the set of row keys (or a count), assigned only when that set
changes: an array rebuilt from the draft on each keystroke recreates
every row, including the one being typed in, which loses its focus.
Git, autostart's rows, HyprSunset, HyprIdle and User keep their own
buttons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/README.md')
| -rw-r--r-- | desktop/README.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop/README.md b/desktop/README.md index 40b5e92..1bd2b7e 100644 --- a/desktop/README.md +++ b/desktop/README.md @@ -35,6 +35,19 @@ gear beside the user header opens it, as do SUPER+Return and IPC: qs -p ./desktop ipc call settings open autostart qs -p ./desktop ipc call settings toggle +A page that edits a file edits a draft: its fields change the draft as they +are typed, and nothing is written until Save in the page's header +(`SaveBar.qml`, through `Page.actions`). Discard drops the draft, a dot in +the sidebar marks a page holding one, and drafts survive moving between +pages. A draft over a file that changed on disk meanwhile is refused at +Save rather than written over it. Two rules make live editing work: a field +is not bound to its value (a binding resets the cursor and eats a typed +trailing space), and a Repeater's model is the set of row keys, assigned +only when that set changes, never an array rebuilt from the draft, which +would recreate the row being typed in on every keystroke and drop its +focus. Git, autostart's rows, HyprSunset, HyprIdle and User keep their own +buttons. + The sidebar's edge drags to resize it, between 160 and 420px; the width is saved in the preferences file on release. |
