Keep global actions visible and follow each platform's title bar

Phase 5-4.

- The workspace button sits at the left end of the header. It shows
  the workspace name and opens the workspace list below it.
- The left ribbon is always present: plugin views at the top, Help and
  Settings at the bottom. The left pane footer is gone.
- Tabs keep 120 pixels and scroll. Fades show tabs out of view, and a
  list button names all tabs, with pinned and unsaved marks. The
  active tab now scrolls into view with its close button.
- A drag area of 120 pixels follows the tabs. In a narrow header, the
  tabs shrink first, and the drag area keeps at least 48 pixels.
- Caption buttons are square, 46 pixels wide, and full height. When the
  pointer rests on maximize, the new window_snap_layouts command opens
  Snap Layouts with Win+Z for the focused window.
- macOS keeps its native traffic lights: tauri.macos.conf.json and the
  runtime window builders use an overlay title bar. Title bars leave
  --rs-titlebar-inset-start free for the traffic lights.
- 3 new catalog rows and 1 removed row, in French, Japanese, and
  Simplified Chinese.
- Docs: UI-050, the user guide, and ui-design.md.

Tests: the new layout/titleBar. Tests that used the left pane footer,
the rounded caption buttons, the 600-pixel theme editor pane, or a
ribbon of no width now follow the new layout.
This commit is contained in:
Knotty Wyvern
2026-10-28 20:21:20 -07:00
parent 9cf82503d0
commit c8cf56b224
31 changed files with 438 additions and 125 deletions
+7 -8
View File
@@ -89,7 +89,7 @@
}
let settings = $state<AppSettings>({ ...DEFAULT_SETTINGS });
let settingsReady = $state(false);
let workspaceAnchor: HTMLDivElement | undefined = $state();
let workspaceAnchor: HTMLButtonElement | undefined = $state();
const desktop = isTauri();
const transferredWindow = /^[0-9a-f-]{36}$/i.test(new URLSearchParams(location.search).get("tabTransfer") ?? "");
// The documents of the open workspace. Their buffers are reactive, so the tabs read them directly.
@@ -1093,7 +1093,7 @@
const shell = event.currentTarget as HTMLElement;
const rect = shell.getBoundingClientRect();
if (dragging === "left") {
leftWidth = Math.min(480, Math.max(160, event.clientX - rect.left - (ribbonNavigation.length ? 44 : 0)));
leftWidth = Math.min(480, Math.max(160, event.clientX - rect.left - 44));
}
if (dragging === "right") {
rightWidth = Math.min(480, Math.max(160, rect.right - event.clientX));
@@ -1209,7 +1209,7 @@
<div
class="shell"
class:detached={transferredWindow}
class:has-ribbon={!transferredWindow && ribbonNavigation.length > 0}
class:has-ribbon={!transferredWindow}
class:left-open={!transferredWindow && leftOpen}
class:right-open={!transferredWindow && rightOpen}
role="application"
@@ -1225,6 +1225,9 @@
<WorkbenchHeader
detached={transferredWindow}
{desktop}
workspaceName={workspace?.name ?? null}
bind:workspaceAnchor
onChooseWorkspace={chooseWorkspace}
{leftOpen}
{leftView}
{sidebarNavigation}
@@ -1244,12 +1247,11 @@
onError={(message) => error = message}
/>
{#if !transferredWindow}<PluginRibbon items={ribbonNavigation} />{/if}
{#if !transferredWindow}<PluginRibbon items={ribbonNavigation} onHelp={() => preferences = "help"} onSettings={() => void openSettings()} />{/if}
{#if leftOpen && !transferredWindow}
<LeftPane
bind:fileTree
bind:workspaceAnchor
{workspace}
{session}
{leftView}
@@ -1262,9 +1264,6 @@
onSaveTemplate={(entry) => { void saveTemplate(entry); }}
onManageTemplates={() => templateManager = true}
onStatus={(message) => { status = message; error = null; }}
onChooseWorkspace={chooseWorkspace}
onHelp={() => preferences = "help"}
onSettings={() => void openSettings()}
/>
<div