Skip to content

Nav polish: active-page indicator, topbar jitter fix, menu/swap transitions - #211

Merged
brianglass merged 7 commits into
mainfrom
nav-active-indicator
Aug 22, 2026
Merged

Nav polish: active-page indicator, topbar jitter fix, menu/swap transitions#211
brianglass merged 7 commits into
mainfrom
nav-active-indicator

Conversation

@brianglass

@brianglass brianglass commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a visible "you are here" indicator to the top nav: an underline in the site's existing accent color (--color-accent) on whichever nav item matches the current page.
  • Fixes the topbar shifting horizontally between pages (scrollbar-gutter: stable) -- verified in Chrome, Firefox, Edge, and Safari.
  • Fixes the nav row shifting a pixel or two when opening/closing a submenu (single glyph rotated in place instead of swapping two differently-sized characters).
  • Shortens the Douay-Rheims dropdown label to just "Douay-Rheims".
  • Nav submenus and the mobile hamburger menu now fade+slide in on open and, symmetrically, out on close -- the close needed a small JS layer since <details>/nav-open have no native way to defer hiding for an exit animation, with a safety timeout so a menu can't get stuck open if animationend never arrives.
  • Every #orthocal-content swap -- translation select, the Slavic/Greek + Gregorian/Julian toggles, day-nav (Previous/Today/Next Day), and month-nav -- now crossfades via htmx's transition:true swap modifier (View Transitions API where supported, instant swap fallback elsewhere), scoped to #orthocal-content alone so the rest of the page doesn't crossfade too. Uses the browser's plain default crossfade (an earlier, more exaggerated custom fade+shift was tried and reverted).
  • scroll-behavior: smooth for the scripture/commemoration anchor links.
  • All motion is gated behind prefers-reduced-motion.

Bundled into one PR/deployment rather than several separate small ones.

Test plan

  • Full suite passes (docker compose run --rm tests), 165/165
  • Verified nav active-page indicator across Readings/Calendar/Saints/API/About
  • Verified topbar position and submenu-toggle jitter fixes across Chrome, Firefox, Edge, Safari
  • Verified submenu and mobile-nav open/close animations via real clicks (confirmed details.open/nav-open state resolves correctly after the exit animation)
  • Confirmed document.startViewTransition fires for the translation select, both toggle groups, and day/month nav, and that only #orthocal-content animates (not the whole page)
  • Confirmed the tradition/calendar toggle swaps real content correctly (verified via direct liturgics.Day queries across several dates) -- the Aug 21 case where Epistle/Gospel look identical between calendars is expected, since those are Pascha-distance-based and calendar-invariant; the saints list, which is fixed-date, correctly differs

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3

brianglass and others added 3 commits August 21, 2026 14:07
Adds aria-current="page" to the matching nav link (or a .has-active
class on the enclosing "Integrations"/"More" <summary> for pages nested
in a submenu), server-rendered from request.resolver_match.url_name.
Styled with an underline in --color-accent so the active page reads at
a glance without competing with the existing hover treatment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
Drops "(Challoner, 1899)" to match the plain style of the other
dropdown entries (e.g. "King James Version"); the historical detail
stays in the About page's fuller description.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
A page short enough to need no vertical scrollbar rendered a few
pixels wider (viewport-wise) than one that does, shifting the
centered, percentage-width topbar horizontally on navigation -- most
visible with classic (non-overlay) scrollbars on Windows/Linux.
Confirmed via measurement: topbar-inner's left offset moved from 202px
to ~204px between a long and a short page before this fix.

scrollbar-gutter: stable reserves the gutter unconditionally, so the
topbar's position no longer depends on the current page's height.
Verified fixed in Chrome, Firefox, and Edge.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
@brianglass brianglass changed the title Underline the current page in the top nav Nav polish: current-page indicator, topbar jitter fix, shorter DR label Aug 21, 2026
brianglass and others added 2 commits August 21, 2026 14:32
The disclosure arrow swapped between two different characters (\25be
and \25b4) on open/close; those glyphs have very slightly different
advance widths, which shifted the whole nav row (flex-end justified)
by a pixel or two every time "integrations" or "more" toggled.
Rotating one glyph in place instead guarantees identical metrics
regardless of open state.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
Nav submenus ("Integrations"/"More") and the mobile hamburger menu now
fade+slide in on open and, symmetrically, fade+slide out on close --
the close needed a small JS layer (base.html) since <details>/nav-open
have no native way to defer hiding until an exit animation finishes,
including a safety timeout so a menu can't get stuck open if
animationend never arrives (e.g. a backgrounded tab).

The translation select and the Slavic/Greek + Gregorian/Julian toggles
now crossfade #orthocal-content via htmx's transition:true swap
modifier, which uses the View Transitions API where supported and
falls back to an instant swap everywhere else. Scoped to a single
view-transition-name on the outer region (not also on the narrower
#scripture-readings nested inside it) to avoid the spec's behavior of
extracting independently-named elements from their ancestor's capture,
which would otherwise split one swap into two competing transitions.

scroll-behavior: smooth added for the scripture/commemoration anchor
links. All motion is gated behind prefers-reduced-motion.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
@brianglass brianglass changed the title Nav polish: current-page indicator, topbar jitter fix, shorter DR label Nav polish: active-page indicator, topbar jitter fix, menu/swap transitions Aug 21, 2026
brianglass and others added 2 commits August 21, 2026 16:28
…iberate

Day-nav (Previous/Today/Next Day) and month-nav (readings/calendar pages)
now use the same transition:true swap as the translation select and the
tradition/calendar toggles, for consistency across every #orthocal-content
swap.

Also replaced the browser's plain default crossfade with an explicit
fade+shift on #orthocal-content specifically: the default is barely
visible when old and new content look nearly identical (e.g. switching
tradition on a day where only a couple of extra commemorations get
added), which read as "no transition" even though it was firing
correctly. The explicit animation echoes the menu's dropdown-in/out
motion so the swap reads as an intentional transition regardless of how
much content actually changed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
The explicit fade+shift on #orthocal-content read as too exaggerated in
practice. Keeping the view-transition-name (and disabling the root
group's own animation, so only #orthocal-content still animates) but
dropping back to the browser's plain default crossfade.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hf6j2xXQXywHVh3HAVRxB3
@brianglass
brianglass merged commit fddac69 into main Aug 22, 2026
4 checks passed
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