Navigation restructure: five-tab bottom bar, no phone drawer

Drawer removed (phones only; desktop rail untouched)
- MobileSidebar, sidebarOpen/useSidebarOpen, MenuIcon and the drawer's
  back-gesture layer are gone; the shared nav content now serves only
  the desktop rail (dead mobile branches deleted). No drawer-specific
  CSS existed; the three drawer strings (header.openMenu,
  sidebar.closeMenu, common.menu) and library.importAria are removed.
- The header drops the hamburger: logo + name on the left, the single
  theme chip on the right.

Five-tab bottom bar
- Library / Progress / New deck (prominent centre +) / Exam / Settings,
  in that order; Progress and Exam reuse the existing /stats and /exam
  screens, Settings keeps opening the dialog. Sliding pill, icon bounce,
  press feedback, re-tap-to-top and safe-area padding kept; every item
  is >=44px (72px wide at 360px).
- New short tab.* keys (EN + CS) so all five labels stay on one line at
  360px — 'Zkouškový režim' became 'Zkouška'. No ellipsis anywhere.
- The bar is mounted once in AppHeader so library, progress, exam and
  share get it; the wizards keep their own bottom action bar and the
  tab bar steps aside there, exactly as before.

Re-homed drawer destinations
- Smart Review card loses the Exam link (it is a tab now); Review due
  and Mistakes stay.
- New deck screen (and /homework) get a Study deck / Make my homework
  segmented switch; the library's homework empty-state button stays.
- The phone import icon becomes a ... button opening a sheet with
  Import JSON and New folder (back-gesture and Escape close it); folder
  chips still appear only once at least one folder exists, and folder
  creation stays in the New deck options step.

Verified: mobile suite 134 checks (no hamburger/drawer, tab order and
44px targets, label matrix at 360/390 x EN/CS x dark/light x reduced
motion, per-tab routing, deep links, Back from every tab, the ... sheet
with folder creation) plus regression 74/74, wizard 83/83, declutter
116/116, animation 8/8, native 35/35, i18n 25/25, phase1 38/38, phase2
43/43, phase3 20/20, freeze-loading 6/6. Key parity 740/740. Lint +
build clean. SW freezmo-v28.
This commit is contained in:
Martin Dvořák 2026-10-10 16:53:55 +00:00
commit 8557b04621
19 changed files with 357 additions and 325 deletions

View file

@ -84,7 +84,6 @@ const en: Record<string, string> = {
"common.darkMode": "Dark mode",
"common.switchToLight": "Switch to light mode",
"common.switchToDark": "Switch to dark mode",
"common.menu": "Menu",
"common.back": "Back",
"common.next": "Next",
"common.more": "More",
@ -93,20 +92,24 @@ const en: Record<string, string> = {
"common.stepOf": "{n} / {total}",
/* header ---------------------------------------------------------- */
"header.openMenu": "Open menu",
"header.home": "Freezmo home",
"header.tagline": "study feed",
"header.openSettings": "Open settings and Ollama status",
/* tab bar --------------------------------------------------------- */
"tabbar.main": "Main",
/* Short tab labels: they must stay on one line at 360px in both languages. */
"tab.library": "Library",
"tab.progress": "Progress",
"tab.new": "New deck",
"tab.exam": "Exam",
"tab.settings": "Settings",
/* sidebar --------------------------------------------------------- */
"sidebar.collapse": "Collapse sidebar",
"sidebar.expand": "Expand sidebar",
"sidebar.library": "Library",
"sidebar.label": "Sidebar",
"sidebar.closeMenu": "Close menu",
/* language -------------------------------------------------------- */
"language.label": "Language",
@ -267,6 +270,9 @@ const en: Record<string, string> = {
/* make my homework ------------------------------------------------- */
"homework.nav": "Make my homework",
"wizard.mode.deck": "Study deck",
"wizard.mode.homework": "Make my homework",
"wizard.mode.aria": "Study deck or homework",
"homeworkHeroTitle": "Make my homework",
"homework.subtitle": "Paste it, photograph it or add a file — then pick how I should help.",
"homework.phone.assignment": "The assignment",
@ -343,7 +349,8 @@ const en: Record<string, string> = {
"library.title": "Your icebox",
"library.subtitle": "Decks frozen from your notes, saved in this browser.",
"library.import": "Import JSON",
"library.importAria": "Import deck JSON",
"library.moreActions": "More actions",
"library.moreTitle": "Library actions",
"library.folderCreated": "Folder created — decks you freeze while it's selected land here.",
"library.imported": "Imported “{title}”.",
"library.couldNotRead": "Could not read that file.",
@ -913,7 +920,6 @@ const cs: Record<string, string> = {
"common.darkMode": "Tmavý režim",
"common.switchToLight": "Přepnout na světlý režim",
"common.switchToDark": "Přepnout na tmavý režim",
"common.menu": "Menu",
"common.back": "Zpět",
"common.next": "Další",
"common.more": "Více",
@ -922,20 +928,24 @@ const cs: Record<string, string> = {
"common.stepOf": "{n} / {total}",
/* header ---------------------------------------------------------- */
"header.openMenu": "Otevřít menu",
"header.home": "Domů — Freezmo",
"header.tagline": "studijní feed",
"header.openSettings": "Otevřít nastavení a stav Ollamy",
/* tab bar --------------------------------------------------------- */
"tabbar.main": "Hlavní",
/* Krátké popisky záložek: musí zůstat na jednom řádku při 360px v obou jazycích. */
"tab.library": "Knihovna",
"tab.progress": "Pokrok",
"tab.new": "Nová sada",
"tab.exam": "Zkouška",
"tab.settings": "Nastavení",
/* sidebar --------------------------------------------------------- */
"sidebar.collapse": "Sbalit panel",
"sidebar.expand": "Rozbalit panel",
"sidebar.library": "Knihovna",
"sidebar.label": "Postranní panel",
"sidebar.closeMenu": "Zavřít menu",
/* language -------------------------------------------------------- */
"language.label": "Jazyk",
@ -1096,6 +1106,9 @@ const cs: Record<string, string> = {
/* make my homework ------------------------------------------------- */
"homework.nav": "Udělej mi úkol",
"wizard.mode.deck": "Studijní sada",
"wizard.mode.homework": "Udělej mi úkol",
"wizard.mode.aria": "Studijní sada nebo úkol",
"homeworkHeroTitle": "Udělej mi úkol",
"homework.subtitle": "Vlož ho, vyfoť nebo přidej soubor — a vyber, jak ti mám pomoct.",
"homework.phone.assignment": "Zadání",
@ -1172,7 +1185,8 @@ const cs: Record<string, string> = {
"library.title": "Tvoje mraznička",
"library.subtitle": "Sady zmrazené z tvých poznámek, uložené v tomto prohlížeči.",
"library.import": "Importovat JSON",
"library.importAria": "Importovat JSON sady",
"library.moreActions": "Další akce",
"library.moreTitle": "Akce knihovny",
"library.folderCreated": "Složka vytvořena — sady, které zmrazíš, když je vybraná, přistanou tady.",
"library.imported": "Importováno „{title}“.",
"library.couldNotRead": "Tento soubor se nepodařilo přečíst.",

View file

@ -8,7 +8,7 @@
*
* - `springSnappy` — press releases and small UI changes (180–220ms feel).
* - `springGentle` — screen content, lists, feedback panels (280–350ms).
* - `springSheet` — bottom sheets and the drawer, tuned for dragging.
* - `springSheet` — bottom sheets, tuned for dragging.
* - `EASE_OUT` — quick fades that don't need a spring.
*
* Only transform and opacity are ever animated (plus the explicit height
@ -27,7 +27,7 @@ export const springSnappy: Transition = { type: "spring", stiffness: 520, dampin
/** Content entering/exiting a screen or list. ~300ms, a whisper of overshoot. */
export const springGentle: Transition = { type: "spring", stiffness: 300, damping: 30, mass: 0.9 };
/** Sheets and the drawer: responsive to release velocity, settles fast. */
/** Bottom sheets: responsive to release velocity, settles fast. */
export const springSheet: Transition = { type: "spring", stiffness: 380, damping: 36, mass: 1 };
/** Crisp fade for elements that should not move. */

View file

@ -30,39 +30,6 @@ export const folderSelection = {
},
};
/* Mobile drawer ---------------------------------------------------------- */
let drawerOpen = false;
const drawerListeners = new Set<() => void>();
export const sidebarOpen = {
subscribe(listener: () => void): () => void {
drawerListeners.add(listener);
return () => drawerListeners.delete(listener);
},
getSnapshot(): boolean {
return drawerOpen;
},
getServerSnapshot(): boolean {
return false;
},
set(value: boolean): void {
drawerOpen = value;
drawerListeners.forEach((listener) => listener());
},
toggle(): void {
sidebarOpen.set(!drawerOpen);
},
};
export function useSidebarOpen(): boolean {
return useSyncExternalStore(
sidebarOpen.subscribe,
sidebarOpen.getSnapshot,
sidebarOpen.getServerSnapshot,
);
}
export function useSelectedFolder(): string {
return useSyncExternalStore(
folderSelection.subscribe,

View file

@ -10,8 +10,8 @@ import { useCallback, useEffect, useRef } from "react";
* standalone) closes the layer instead of leaving the page. Layers form a
* stack, so only the topmost one reacts. Closing a layer through its own UI
* pops the pushed entry again — unless the layer closed because of a
* navigation (a drawer link), in which case the entry is left for the
* permanent listener to skip on the next Back press.
* navigation (a link inside the layer), in which case the entry is left for
* the permanent listener to skip on the next Back press.
*/
type State = { freezmoLayer?: boolean };