Skip to content

refactor(navbar): delete the v1 navbar and footer (J6) - #331

Merged
wab merged 5 commits into
mainfrom
refactor/250-delete-v1-navbar-footer
Nov 17, 2026
Merged

wab merged 5 commits into
mainfrom
refactor/250-delete-v1-navbar-footer

Conversation

@wab

@wab wab commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Closes #250. Part of #212 (J6).

Since #324, app/components/LayoutMain.tsx renders only the v2 navbar and footer. This PR deletes the v1 ones.

Changes

  • Type move. app/components/navbar/types.ts is now app/components/navbar-v2/types.ts. All 14 importers point there. The navbar-v2 files use the ~/components/navbar-v2/types alias, which keeps each change to one line in files the J5: studio page with a PersonCard per member #244 branch also edits.
  • Deletions. app/components/navbar/ (navbar, mobile menu, dropdown parts, styles, scroll hook, test) and app/components/Footer.tsx. A grep over app/, e2e/, the tests and the /design-system pages finds no importer. The v2 code used no v1 helper: it has its own use-scrolled.ts.
  • Types. NavbarScrollState and ScrollDirection are dropped. Only the v1 scroll hook used them.
  • i18n. 16 keys removed from locales/fr/common.json and locales/en/common.json: footer.company.*, footer.services.*, footer.method.*, footer.resources.* and footer.newsletter.*. Only the v1 footer used them, and no code builds footer.* keys dynamically. The remaining footer.* keys are all used by the v2 footer.
  • Tests. The v1 navbar test held the only checks of three behaviours, now ported:
    • the challenge load flag that shouldRevalidate reads in app/routes/_main.tsx (in app/hooks/useMenuItems.test.tsx);
    • how each published challenge becomes a menu entry: label, tagline, localised path, palette (same file);
    • the challenges in the mobile menu, and the close button (in app/components/navbar-v2/navbar-bar.test.tsx).
  • Docs. The component inventory lists the v2 navbar parts in place of the outdated navigation table. ADR 0001 drops the two deleted files from its follow-up table. The source tree names navbar-v2/ and footer-v2/.

Left as is, for follow-up

  • app/components/NewsletterForm.tsx and app/components/ui/Spinner.tsx are no longer rendered anywhere: the v1 footer and navbar were their only users. NewsletterForm is the only newsletter sign-up, so removing it is a product decision. The inventory marks both as unused.
  • app/components/LanguageSwitcher.tsx was already unused before this PR.
  • ADR 0002 says the decision to skip screenshot tests is reviewed at J6, once the v1 navbar and footer are deleted. This PR meets that condition.
  • The "Shared chrome" rows of docs/development/j1-route-review-checklist.md were written for the v1 navbar. Check they still apply before the next rerun.
  • specs/ still names the v1 paths. Those files are history and stay unchanged.

Pages this can alter

None by design: the deleted code was no longer rendered. The navigation types moved without change.

Checks

pnpm check, pnpm typecheck and pnpm test:run (86 files, 1238 tests) pass. A code review of the branch diff found no critical or high issue. Its test gap and doc findings are fixed in the last two commits.

wab added 5 commits November 16, 2026 21:42
The v2 navbar, the v2 footer and the menu hooks import NavItem and
DropdownItem from the v1 navbar folder, which is about to be deleted.
The types file now lives in app/components/navbar-v2/types.ts and every
import points there.
Since #324 the layout renders only the v2 navbar and footer, and no
module imports the v1 ones.

- Delete app/components/navbar/ and app/components/Footer.tsx, with the
  v1 navbar test.
- Drop the NavbarScrollState and ScrollDirection types, used only by the
  v1 scroll hook.
- Remove the footer.company, footer.services, footer.method,
  footer.resources and footer.newsletter keys from both locales. Only the
  v1 footer used them.
- Move the check of the challenge load flag, read by shouldRevalidate in
  the main route, from the v1 navbar test to the useMenuItems test. It
  was its only test.
- Component inventory: replace the outdated navigation table with the
  v2 navbar parts, note where the navigation types live, and mark
  NewsletterForm as no longer rendered.
- ADR 0001: remove the deleted v1 footer and mobile menu from the shared
  component follow-up table.
- Source tree: list navbar-v2 and footer-v2 in place of Header.tsx and
  Footer.tsx.
The deleted v1 navbar test was the only check on how the challenge
entries are built and shown.

- useMenuItems: each published challenge maps to an entry with its
  label, tagline, localised path and palette. Reset the challenge load
  flag after each test, since it is module state.
- NavbarBar mobile menu: the close button closes the dialog, and the
  challenges from the layout data appear in the menu.
- LayoutMain: update the comment that named the v1 footer.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
website Ready Ready Preview Nov 16, 2026 8:50pm UTC

Request Review

@wab
wab merged commit c8a2040 into main Nov 17, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview — d5fa4d4a Deployed Nov 16, 2026 by vercel[bot]
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.

J6: delete the v1 navbar and footer

1 participant