my-books v3 slice 01 — header reframe + mobile tabs#166
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/librarywhen authenticated (fallback until slice 03 ships/home).UserMenudrops migrated items (My Library / Highlights / Vocabulary / My language) — kept Edit profile + Sign out.DiscoverMenulabel flips Books → Discover under flag.apps/web/src/lib/features.ts(deleted in v2 slice 99) withmyBooksV3.headerReframe. Mirrored on mobile viaEXPO_PUBLIC_MYBOOKSV3_HEADER_REFRAME.lib/telemetry/myBooksV3.ts—header.click,home.landed.Behind flag
myBooksV3.headerReframe— default OFF in prod (VITE_FEATURE_MYBOOKSV3_HEADER_REFRAME=falseadded todeploy.ymlper DoD #0). Flip totrueafter slice 04 lands smart shelves on/home.Tests
Header.test.tsxcases (flag ON auth/unauth, flag OFF, logo target).UserMenu.test.tsxcases (dropdown trims under flag).tsc --noEmit✅.Test plan
/enlogged-in shows Home/Library/Discover/Vocabulary, no About in primary nav./enlogged-out shows logo · Discover · About · Sign in.Rollback
Set
VITE_FEATURE_MYBOOKSV3_HEADER_REFRAME=false(already default). Old header returns. No data changes.Follow-ups
/books→/discoverURL migration with 301s./homeroute + state-aware landing (turns logo target into a real route)./home. After this lands, flip the flag totrue.