Skip to content

Replace nav dropdown with slide-in SiteNavPanel overlay#140

Merged
hawkandheron-dev merged 2 commits into
mainfrom
claude/fix-overlay-navigation-AY7NL
Apr 25, 2026
Merged

Replace nav dropdown with slide-in SiteNavPanel overlay#140
hawkandheron-dev merged 2 commits into
mainfrom
claude/fix-overlay-navigation-AY7NL

Conversation

@hawkandheron-dev
Copy link
Copy Markdown
Owner

Summary

Replaces the dropdown navigation menu with a new fixed-position slide-in panel (SiteNavPanel) that appears on the left side of the screen. This provides a more prominent navigation experience with a backdrop overlay and improved accessibility.

Key Changes

  • New SiteNavPanel component (SiteNavPanel.jsx + SiteNavPanel.css)

    • Fixed-position left slide-in overlay with parchment styling matching the Tour panel
    • Includes backdrop with fade-in animation and panel slide-in animation
    • Supports keyboard navigation (Escape to close) and focus management
    • Displays 5 primary navigation items with active state highlighting
    • Prevents body scroll while open via CSS :has() selector
    • Full light/dark mode support
  • Updated app components to use new navigation

    • ChurchHistoryApp.jsx: Replaced NavDropdown with SiteNavPanel
    • ChurchHistorySupabaseApp.jsx: Replaced NavDropdown with SiteNavToggle button + SiteNavPanel
    • Both now manage navOpen state and pass activeKey to highlight current page
  • Removed old dropdown styles from App.css

    • Deleted .nav-dropdown, .nav-dropdown-menu, and .nav-dropdown-item styles
    • Added .site-nav-toggle styles for the hamburger button
  • Page loader improvements across all HTML files

    • Added session-based loader suppression: returning visitors within the same session skip the overlay
    • Uses sessionStorage to track if loader has been seen
    • Gracefully handles storage access errors with try/catch

Implementation Details

  • Navigation panel uses semantic HTML (<aside role="dialog">, <nav aria-label="Primary">)
  • Close button receives focus when panel opens for keyboard users
  • Clicking backdrop, close button, or any nav link closes the panel
  • Active nav item indicated by aria-current="page" and inverted color scheme
  • Smooth animations use cubic-bezier easing for natural motion
  • Responsive: panel width caps at 85vw on mobile devices

https://claude.ai/code/session_011tVKEsSMcxkH5YinLVgunX

claude added 2 commits April 24, 2026 15:59
- Loader now dismisses via sessionStorage flag + inline pre-paint gate, so
  navigating back to a page within the same browser session skips the
  overlay entirely (fixes the home page re-showing the loader after CH
  Timeline).
- New nav.js injects a single sticky header (brand, primary links, auth
  slot, hamburger drawer on mobile) on every page, replacing the ad-hoc
  site-nav / top-nav markup that was duplicated per page. editable-content.js
  still targets .top-nav inside the header unchanged.
- Home landing-nav reordered so Church history timeline is first, and the
  "Pantheons database", "African kingdoms", "Design system" labels are
  sentence-cased to match the rest of the site.
- New SiteNavPanel component (timeline-scratch/src/components/) renders a
  fixed, left-side overlay with a parchment card + backdrop, matching the
  Tour panel's visual language. Slides in from the left; closes on Escape,
  backdrop click, close button, or link click.
- Hamburger moved from the right side of the header to the far left of
  .header-content — sits left of the search bar. Replaces the previous
  right-aligned NavDropdown in both ChurchHistoryApp and
  ChurchHistorySupabaseApp (including the Suggestions, Getting Started,
  and no-Clerk view branches).
- Panel items: Home, CH Timeline, Pantheons, Biblical atlas, Timeline
  component (last). Active page highlighted via activeKey prop.
- Removed orphaned .nav-dropdown* CSS.
- Landing-nav on home: Timeline moved to the bottom and relabelled
  "Timeline component".
- Reverts the earlier site-wide top nav + drawer experiment on the main
  static pages; loader sessionStorage gating is kept.
@hawkandheron-dev hawkandheron-dev merged commit d6a9005 into main Apr 25, 2026
4 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc77cfe6c9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<SiteNavPanel
open={navOpen}
onClose={() => setNavOpen(false)}
activeKey="church-history"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mark only the actual page as current in nav panel

Passing activeKey="church-history" here causes SiteNavPanel to set aria-current="page" on the CH Timeline link, but this component is rendered on church-history.html (the JSON page), not church-history-timeline.html. That means screen readers and visual highlighting report the wrong current page, which is an accessibility and navigation regression introduced by the new active-state logic.

Useful? React with 👍 / 👎.

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.

2 participants