ui: reorder top-level navigation #22

Merged
jarvis-at-skic merged 1 commits from ui/reorder-top-navigation-20260903 into main 2026-09-03 12:25:55 -07:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 90f3aa0c11 - Show all commits
+2 -2
View File
@@ -63,12 +63,12 @@ const config: Config = {
navbar: {
title: 'CORP V1 / BOARD',
items: [
{type: 'docSidebar', sidebarId: 'boardSidebar', docsPluginId: 'board', label: 'Board', position: 'left'},
{type: 'docSidebar', sidebarId: 'projectsSidebar', docsPluginId: 'projects', label: 'Projects', position: 'left'},
{type: 'docSidebar', sidebarId: 'waysOfWorkingSidebar', docsPluginId: 'ways-of-working', label: 'Ways of Working', position: 'left'},
{type: 'docSidebar', sidebarId: 'teamsSidebar', docsPluginId: 'teams', label: 'Teams', position: 'left'},
{type: 'docSidebar', sidebarId: 'membersSidebar', docsPluginId: 'members', label: 'Members', position: 'left'},
{type: 'docSidebar', sidebarId: 'boardSidebar', docsPluginId: 'board', label: 'Board', position: 'left'},
{type: 'docSidebar', sidebarId: 'governanceSidebar', docsPluginId: 'governance', label: 'Governance', position: 'left'},
{type: 'docSidebar', sidebarId: 'waysOfWorkingSidebar', docsPluginId: 'ways-of-working', label: 'Ways of Working', position: 'left'},
{type: 'docSidebar', sidebarId: 'architectureHighLevelSidebar', docsPluginId: 'architecture-high-level', label: 'Architecture', position: 'left'},
{href: 'https://gitea.lego-cloud.eu/corp-v1/portal', label: 'Gitea ↗', position: 'right'},
],
+2 -2
View File
@@ -32,10 +32,10 @@ assert.match(config, /label:\s*'Architecture'/, 'Architecture navbar label is mi
assert.doesNotMatch(config, /label:\s*'Architecture High Level'/, 'legacy Architecture High Level menu label must not remain');
assert.ok(existsSync(join(root, 'sidebars/architecture-high-level.ts')), 'Architecture High Level sidebar file is missing');
const expectedLeftNavLabels = ['Projects', 'Ways of Working', 'Teams', 'Members', 'Board', 'Governance', 'Architecture'];
const expectedLeftNavLabels = ['Board', 'Projects', 'Teams', 'Members', 'Governance', 'Ways of Working', 'Architecture'];
const leftNavLabels = [...config.matchAll(/\{type:\s*'docSidebar',[^\n]+label:\s*'([^']+)',\s*position:\s*'left'\}/g)]
.map((match) => match[1]);
assert.deepEqual(leftNavLabels, expectedLeftNavLabels, 'Architecture must be the final left-side menu item');
assert.deepEqual(leftNavLabels, expectedLeftNavLabels, 'Top-level navigation must follow the approved Board-first order');
const waysOfWorkingSidebar = read('sidebars/ways-of-working.ts');
assert.match(waysOfWorkingSidebar, /link:\s*\{type:\s*'doc',\s*id:\s*'index'\}/, 'Ways of Working must link to its entry page');