Skip to content

Add optional section bar to the app shell - #52

Merged
RaviTejaKNTS merged 2 commits into
mainfrom
feat/section-bar
Oct 15, 2026
Merged

RaviTejaKNTS merged 2 commits into
mainfrom
feat/section-bar

Conversation

@RaviTejaKNTS

Copy link
Copy Markdown
Collaborator

What

An optional second row under the main navigation, so a group of related pages can feel like its own space. Pages opt in with sectionNav on AppShell, the same way they pick sidebarPosition. No live page uses it yet; the ad networks section will be first.

<AppShell
  sidebarPosition="none"
  sectionNav={{
    label: "ad networks",
    href: "/ad-networks",
    current: "/ad-networks/stats",
    items: [
      { label: "Directory", href: "/ad-networks" },
      { label: "Niches", href: "/ad-networks/niches" },
      { label: "Stats", href: "/ad-networks/stats" },
      { label: "Checker", href: "/ad-networks/checker" },
    ],
  }}
>

Behavior

  • Lowercase mono section name on the left linking home, then 3 to 6 page links. The current page gets accent text and a 2px underline, with aria-current="page".
  • Not sticky. It scrolls away; the main navigation stays sticky and sidebars still stick right under it.
  • On phones, one row that scrolls sideways. The current link is scrolled into view on load without moving the page or focus.
  • Server-rendered links. Hidden in print.
  • Works with left, right, and none sidebars. Shell heights account for the bar only when it is present, so short pages don't scroll and pages without it are unchanged.

Files

  • app/ui/site/section-bar.tsx, section-bar-scroll.tsx, section-bar.module.css: the bar.
  • app/ui/site/app-shell.tsx, app-shell.module.css: the sectionNav prop and height allowance.
  • app/(site)/(components-ui-modes)/components-ui/section-bar/[position]/[view]/: dev-only previews, guarded like the sidebar-modes previews.
  • Gallery entry, lib/registered-site-pages.json, and docs: design-system.md, shared-ui.md, page-families.md, css-architecture.md, page-build skill.

Checks

  • npm run quality: TypeScript and 79/79 core tests.
  • Headless browser at 1440px, 1280x1600, 390px, and 320px, both themes, all three sidebar positions: no page overflow, no extra scroll on short pages, sticky nav and sidebars, drawer, consent banner, active link visible on phones.
  • Separate Sol review: two findings (short-page scroll, light-mode underline contrast) and one doc nit, all fixed and rechecked.

Known tradeoff: with a left or right sidebar, the sticky sidebar is sized for the viewport minus the section bar, so after scrolling it ends about 50px above the bottom of the screen. Pages with no sidebar are unaffected.

🤖 Generated with Claude Code

- AppShell takes an optional sectionNav: a short row under the main
  navigation for a section's 3 to 6 main pages. The section name links
  home and the current page gets an accent underline. It scrolls away
  with the page, scrolls sideways on phones with the current link in
  view, and is hidden in print. Works with every sidebar position.
- Shell heights account for the bar only when it is present, so short
  pages don't scroll. Pages without it are unchanged.
- Dev-only previews at /components-ui/section-bar/[position]/[view].
- Design, shared UI, page family, CSS docs and the page-build skill
  describe when to use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RaviTejaKNTS
RaviTejaKNTS merged commit 26146c5 into main Oct 15, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
production — 22af1074 Deployed Oct 15, 2026 by RaviTejaKNTS via verify-production-build #52
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