Merge pull request 'ui: reorder top-level navigation' (#22)
Build and publish Corp v1 Board portal / build (push) Successful in 38s
Build and publish Corp v1 Board portal / build (push) Successful in 38s
This commit was merged in pull request #22.
This commit is contained in:
@@ -63,12 +63,12 @@ const config: Config = {
|
|||||||
navbar: {
|
navbar: {
|
||||||
title: 'CORP V1 / BOARD',
|
title: 'CORP V1 / BOARD',
|
||||||
items: [
|
items: [
|
||||||
|
{type: 'docSidebar', sidebarId: 'boardSidebar', docsPluginId: 'board', label: 'Board', position: 'left'},
|
||||||
{type: 'docSidebar', sidebarId: 'projectsSidebar', docsPluginId: 'projects', label: 'Projects', 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: 'teamsSidebar', docsPluginId: 'teams', label: 'Teams', position: 'left'},
|
||||||
{type: 'docSidebar', sidebarId: 'membersSidebar', docsPluginId: 'members', label: 'Members', 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: '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'},
|
{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'},
|
{href: 'https://gitea.lego-cloud.eu/corp-v1/portal', label: 'Gitea ↗', position: 'right'},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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.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');
|
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)]
|
const leftNavLabels = [...config.matchAll(/\{type:\s*'docSidebar',[^\n]+label:\s*'([^']+)',\s*position:\s*'left'\}/g)]
|
||||||
.map((match) => match[1]);
|
.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');
|
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');
|
assert.match(waysOfWorkingSidebar, /link:\s*\{type:\s*'doc',\s*id:\s*'index'\}/, 'Ways of Working must link to its entry page');
|
||||||
|
|||||||
Reference in New Issue
Block a user