Skip to content

my-books v3 slice 01 — header reframe + mobile tabs#166

Merged
mrviduus merged 1 commit into
mainfrom
ux/my-books-v3-ia
Apr 28, 2026
Merged

my-books v3 slice 01 — header reframe + mobile tabs#166
mrviduus merged 1 commit into
mainfrom
ux/my-books-v3-ia

Conversation

@mrviduus
Copy link
Copy Markdown
Owner

Summary

  • Web header reframed: auth users get Home / Library / Discover / Vocabulary, unauth keep Discover / About / Sign-in. Logo points to /library when authenticated (fallback until slice 03 ships /home).
  • UserMenu drops migrated items (My Library / Highlights / Vocabulary / My language) — kept Edit profile + Sign out.
  • DiscoverMenu label flips Books → Discover under flag.
  • Mobile bottom-tabs reorder to Home / Discover / + / Library / Vocab with raised center "+" button (lockstep with web — no separate mobile slice per locked-in decision feat: add full-text search library with PostgreSQL FTS #2).
  • Re-introduced apps/web/src/lib/features.ts (deleted in v2 slice 99) with myBooksV3.headerReframe. Mirrored on mobile via EXPO_PUBLIC_MYBOOKSV3_HEADER_REFRAME.
  • Telemetry lib/telemetry/myBooksV3.tsheader.click, home.landed.

Behind flag

myBooksV3.headerReframe — default OFF in prod (VITE_FEATURE_MYBOOKSV3_HEADER_REFRAME=false added to deploy.yml per DoD #0). Flip to true after slice 04 lands smart shelves on /home.

Tests

  • 5 new Header.test.tsx cases (flag ON auth/unauth, flag OFF, logo target).
  • 3 new UserMenu.test.tsx cases (dropdown trims under flag).
  • Web build ✅, mobile tsc --noEmit ✅.

Test plan

  • Browser: /en logged-in shows Home/Library/Discover/Vocabulary, no About in primary nav.
  • Browser: /en logged-out shows logo · Discover · About · Sign in.
  • Avatar dropdown (auth, flag ON): only Edit profile + Sign out.
  • Mobile: bottom-tabs Home / Discover / + / Library / Vocab, no Profile tab; tap + → upload screen.
  • Toggle flag OFF in env → legacy header restores.

Rollback

Set VITE_FEATURE_MYBOOKSV3_HEADER_REFRAME=false (already default). Old header returns. No data changes.

Follow-ups

  • Slice 02 — /books/discover URL migration with 301s.
  • Slice 03 — /home route + state-aware landing (turns logo target into a real route).
  • Slice 04 — smart shelves on /home. After this lands, flip the flag to true.

Restructure primary nav around personal surfaces (Home/Library) with
public catalog (Discover) demoted to secondary. Behind
myBooksV3.headerReframe — default OFF in prod (flip after slice 04
ships /home content).

Web:
- features.ts re-introduced with myBooksV3.headerReframe
- telemetry/myBooksV3.ts (header.click / home.landed)
- Header: Home/Library/Discover/Vocabulary for auth, Discover/About/
  Sign-in for unauth. Logo → /library when auth (until slice 03
  introduces /home), /  otherwise.
- UserMenu: drops My Library/Highlights/Vocabulary/My language
  (now in primary nav). Keeps Edit profile + Sign out.
- DiscoverMenu: label Books → Discover under flag.
- Header.test.tsx (5) + UserMenu.test.tsx (3) cover ON/OFF + auth.

Mobile:
- features.ts: myBooksV3HeaderReframe (default OFF)
- (tabs)/_layout.tsx: flag-gated reorder Home/Discover/+/Library/Vocab
  with Profile hidden via href: null.
- New UploadTabButton (raised center +) → /my-books/upload.
- New (tabs)/upload.tsx placeholder.

Prod env (DoD #0):
- deploy.yml: VITE_FEATURE_MYBOOKSV3_HEADER_REFRAME=false
@mrviduus mrviduus merged commit 34dcc61 into main Apr 28, 2026
5 checks passed
@mrviduus mrviduus deleted the ux/my-books-v3-ia branch April 28, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant