Public Access
feat(nav): simplify navigation and terms (#57)
One glossary (docs/GLOSSARY.md) for all de and en texts. Five nav items; phones get a bottom bar with labels. Community page with following, followers, player search and stats. The bell is the one place for notes, news and open questions. Settings in tabs; auto-save is silent and rolls back on error. Questions page explains itself; removed games are a library filter. Own profile: menu link, public chip, copy link, private hint. Points page starts with a short summary; stats use status colors.
This commit is contained in:
1 parent
45f5087227
commit
3712e3905f
80 files changed
+2237
-1189
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import {describe, expect, it} from 'vitest';
|
||||
|
||||
import {isNavActive, NAV_ITEMS} from './navItems.js';
|
||||
|
||||
const item = (to) => NAV_ITEMS.find((candidate) => candidate.to === to);
|
||||
|
||||
describe('isNavActive', () => {
|
||||
it('theOwnPathAndItsChildrenAreActive', () => {
|
||||
expect(isNavActive(item('/library'), '/library')).toBe(true);
|
||||
expect(isNavActive(item('/library'), '/library/220')).toBe(true);
|
||||
});
|
||||
|
||||
it('thePagesOfTheLibraryKeepLibraryActive', () => {
|
||||
for (const path of ['/wishlist', '/backlog', '/search']) expect(isNavActive(item('/library'), path)).toBe(true);
|
||||
});
|
||||
|
||||
it('theOldFollowingUrlKeepsCommunityActive', () => {
|
||||
expect(isNavActive(item('/community'), '/following')).toBe(true);
|
||||
});
|
||||
|
||||
it('aPathWithTheSamePrefixIsNotActive', () => {
|
||||
expect(isNavActive(item('/library'), '/library-x')).toBe(false);
|
||||
expect(isNavActive(item('/stats'), '/dashboard')).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user