Ask Save or Don't save, and show useful status facts

Phase 5-7.

- A changed tab asks Save, Don't save, or Cancel through the native
  dialog, instead of OK and Cancel to discard.
- The conflict banner uses --rs-warn with a warning icon. Keep my
  edits is the primary choice and comes first. Use disk version comes
  last, in the error color. The banner wraps in a narrow pane.
- The status bar shows the save state, the line and column, the word
  count, the line endings, and the view. It shows the watch mode only
  when it polls a network folder.
- The outline and the document facts follow the active tab. A tab
  without a document has no outline and no document facts.
- Tables: only formula cells have a hover hint, so no hint covers the
  next cell. The table adds no gap above its control area. The add
  controls show while a cell has focus.
- The plugin review marks Install and enable as the primary action. The
  other choice is Install, keep disabled.
- Read follows CommonMark soft breaks. Settings, General, Keep line
  breaks shows each source line break. The table preview and cell
  editors of Write keep their line breaks, because their editing
  depends on them.
- Catalog rows in French, Japanese, and Simplified Chinese.
- Docs: UI-053, the user guide, and plugins.md.

Tests: the new layout/plainFixes, the keepLineBreaks cases in the
settings unit tests, and the new install button name.
This commit is contained in:
Knotty Wyvern
2026-10-28 22:06:13 -07:00
parent 0fdc991b2e
commit eeddd880e1
24 changed files with 294 additions and 70 deletions
+15
View File
@@ -980,3 +980,18 @@ Native shell, background image, and desktop acceptance remain open.
- Evidence: `tests/smoke/layout/panesAndSettings.smoke.mjs`.
- Replaces / replaced by: The fixed side panes of narrow windows, and the Save button of the browser settings.
- Limits: At startup, the saved layout applies as it is, also in a narrow window. Panes give way only when the window becomes narrower. Browser checks use desktop service mocks. The SDK release that publishes the new icon names is a separate step.
### UI-053 — Close prompts, conflicts, the status bar, tables, and line breaks
- Type: Rule change
- Date: 2026-10-28
- Status: Implemented for user review
- Decision source: Owner decisions 11 and 14 of 2026-10-27 (interface review issues 10, 16, 17, 18, 23, and 24), stage 5-7.
- Previous rule: A changed tab closed after "Discard unsaved edits? OK/Cancel", with no Save. The conflict banner had no status color or icon, and Use disk version came first in the same style as the other choices. The status bar showed the path, "native watch", and the mode. A tab without a document kept the outline of the last note. Every table cell showed its address in a tooltip over the next cell, tables had about 70 pixels above them, and their add controls showed only on hover. The plugin review had three equal buttons. Read showed each source line break.
- New rule: A changed tab asks Save, Don't save, or Cancel. The conflict banner uses `--rs-warn` with a warning icon. Keep my edits is the primary choice and comes first, and Use disk version comes last in the error color. The status bar shows the save state, the line and column, the word count, the line endings, and the view, and it shows the watch mode only when it polls. The outline and the document facts follow the active tab. Only formula cells have a hover hint, the table adds no gap above its control area, and the add and drag controls show while a cell has focus. Install and enable is the primary plugin action, and the other choice is Install, keep disabled. Read follows CommonMark soft breaks, and **Keep line breaks** in Settings → General shows each source line break.
- Reason: The safe choice must be the easy choice. The status bar must show useful facts. A hint must not hide text.
- Scope: Tab closing, the conflict banner, the status bar, the outline, Write tables, the plugin install review, and Read.
- Shared implementation: `closeTabs` in `Workbench.svelte`, `DocumentArea.svelte`, `StatusBar.svelte`, `tableControls.ts`, `PluginManager.svelte`, `reading.css`, and `fileTitle.ts` (the document settings).
- Evidence: `tests/smoke/layout/plainFixes.smoke.mjs` and `tests/unit/layout/settings.spec.ts`.
- Replaces / replaced by: The OK and Cancel close prompt, and `white-space: pre-line` for every Read paragraph.
- Limits: The word count splits on spaces and counts each Han, Hiragana, and Katakana character as one word. The close prompt uses the native dialog, which browser checks mock. The table control area keeps its 26-pixel padding, because the drag handles need it. The drag handles still show only on hover: showing every row and column handle on focus was too busy. The line break setting applies to Read. The table preview and cell editors of Write keep each line break, because their editing depends on it.