feat(navigation): add Material You app shell

This commit is contained in:
2026-07-23 01:03:56 +08:00
parent b62c7e6f31
commit 7a9520be9e
6 changed files with 114 additions and 30 deletions

View File

@@ -0,0 +1,25 @@
/*
* Copyright (C) Contributors to the Suwayomi project
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import assert from 'node:assert/strict';
import { describe, it } from 'node:test';
import { MATERIAL_YOU_NAVIGATION } from '@/features/navigation-bar/MaterialYouNavigation.ts';
describe('Material You navigation tokens', () => {
it('uses accessible rail and bottom-bar dimensions', () => {
assert.equal(MATERIAL_YOU_NAVIGATION.railWidth, 88);
assert.equal(MATERIAL_YOU_NAVIGATION.expandedWidth, 280);
assert.equal(MATERIAL_YOU_NAVIGATION.bottomBarMinHeight, 80);
assert.ok(MATERIAL_YOU_NAVIGATION.touchTarget >= 44);
});
it('uses pill indicators and an accessible landmark label', () => {
assert.equal(MATERIAL_YOU_NAVIGATION.activeIndicatorRadius, 999);
assert.equal(MATERIAL_YOU_NAVIGATION.landmarkLabel, 'Primary navigation');
});
});