Put the global actions in a bottom bar and the tools in the ribbon
Decision 3 correction and the owner's ribbon direction of 2026-10-28. - One bar at the bottom of the side pane holds the workspace switcher, Help, and Settings, as in Obsidian. The switcher opens the workspace list above it. The header has no workspace button. - While the side pane is closed, the workspace switcher, Help, and Settings move to the bottom of the left ribbon, so they stay reachable. - New browser tab, Terminal, Plug-in views, and Commands moved from the header to the top of the left ribbon, so the tabs have more room. Their menus open at the right of the ribbon. The header keeps Save, the outline toggle, and the window controls. A detached tab window has no ribbon and keeps these tools in its header. - Docs: decision 3 and the ribbon tools in UI-050, ui-design.md, and the user guide. Tests: layout/titleBar checks the bottom bar, the ribbon fallback, and the header buttons. workspace/openAndCreate uses the ribbon switcher in a narrow window. tree/renameUndo reads the tools in the ribbon.
This commit is contained in:
@@ -133,11 +133,12 @@ await runSmoke('tree/renameUndo', async ({ browser }) => {
|
||||
const registry = await import(performance.getEntriesByType('resource').find(entry => new URL(entry.name).pathname === '/src/lib/plugins/registry.ts').name);
|
||||
registry.pluginHost.get('browser').newTab = async () => { window.__TEST__.browserOpened = true; };
|
||||
});
|
||||
await page.locator('.header-right').getByRole('button', { name: 'New browser tab', exact: true }).click();
|
||||
// The app tools are in the left ribbon. Plugin view shortcuts stay out of it in this test (src/lib/layout/PluginRibbon.svelte).
|
||||
await page.locator('.plugin-ribbon').getByRole('button', { name: 'New browser tab', exact: true }).click();
|
||||
assert.equal(await page.evaluate(() => window.__TEST__.browserOpened), true);
|
||||
assert.equal(await page.locator('.header-right').getByRole('button', { name: 'Project Management', exact: true }).count(), 0);
|
||||
assert.equal(await page.locator('.plugin-ribbon .ribbon-tools').getByRole('button', { name: 'Project Management', exact: true }).count(), 0);
|
||||
assert.equal(await page.locator('.header-left').getByRole('button', { name: 'Source control', exact: true }).count(), 1);
|
||||
assert.equal(await page.locator('.header-right').getByRole('button', { name: 'Source control', exact: true }).count(), 0);
|
||||
assert.equal(await page.locator('.plugin-ribbon .ribbon-tools').getByRole('button', { name: 'Source control', exact: true }).count(), 0);
|
||||
await page.getByRole('button', { name: 'Plug-in views', exact: true }).click();
|
||||
assert.equal(await page.getByRole('menuitem', { name: /Project Management/ }).count(), 1);
|
||||
assert.equal(await page.getByRole('menuitem', { name: /New browser tab/ }).count(), 0);
|
||||
|
||||
Reference in New Issue
Block a user