Skip to content

Clean up the ledger bookmark tab: alignment, shadow, icon-only design#386

Merged
isundaylee merged 5 commits into
mainfrom
fix-alignment
Jul 11, 2026
Merged

Clean up the ledger bookmark tab: alignment, shadow, icon-only design#386
isundaylee merged 5 commits into
mainfrom
fix-alignment

Conversation

@isundaylee

@isundaylee isundaylee commented Jul 11, 2026

Copy link
Copy Markdown
Owner

What & why

Cleans up the history-sidebar bookmark tab (.ledgerTab in PageShell), which looked misaligned and visually inconsistent:

  • Icon-only tab. The chevron + vertical writing-mode text label never centered cleanly (vertical-rl places glyph ink by font vertical-origin metrics, which vary per platform font). The tab now shows a single icon per state: the sidebar's identity glyph when collapsed (a History icon, passed by the call site via the new sidebarGlyph prop) and a collapse icon when expanded. The collapse icon is the right-pointing PanelLeftOpen glyph on purpose: collapsing moves the panel's left edge rightward, so lucide's left-pointing "close" variant read reversed.
  • The tab no longer overhangs the panel. .ledgerTabTrack's old left: -29px is relative to .split, which starts at the inner edge of the panel's 1px border — the 30px tab poked 1px past the border into the panel interior. Now -31px: the tab sits fully outside, flush against the border, and the hairline stays visible, doubling as the tab's right edge (tab bg and panel bg are different surfaces, so covering the border showed a color seam).
  • Off-token shadow removed. The tab had a hard-coded box-shadow: -1px 0 4px rgba(0,0,0,0.1) that smeared onto the panel interior and contradicted the design system (--shadow: none for persistent surfaces; hairline borders provide separation). Now box-shadow: var(--shadow) like Card/Navigation.

Testing

  • Verified against the running dev stack with headless Chromium in light and dark themes, both collapsed and expanded states: icons center in the tab, and a per-pixel luminance scan across the tab/panel junction shows tab surface → 1px border hairline → panel interior with no overlap or shadow bleed.
  • pre-commit run passes (eslint, tsc, stylelint, no-hardcoded-colors).

🤖 Generated with Claude Code

isundaylee and others added 3 commits July 11, 2026 07:29
- Center the tab content: compensate for the 1px of the tab that rides on
  the panel border, and nudge the vertical-rl label's glyph ink left to
  optically center it under the chevron.
- Move the track to -30px so the tab's right edge lands exactly on the
  panel border instead of overhanging 1px into the panel interior.
- Replace the hard-coded drop-shadow with var(--shadow): the tab is a
  persistent surface, so separation comes from the hairline border.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The tab bg (--color-surface) and panel bg (--panel-bg) are different
surfaces, so covering the border hairline showed a color seam; sit the
tab fully outside the border instead and let the hairline double as the
tab's right edge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Tab now shows a single icon per state: the sidebar's identity glyph
  (History, via new sidebarGlyph prop) when closed, a collapse icon when
  open — replacing the chevron + vertical text label and its
  font-metric alignment quirks.
- Sit the tab fully outside the panel border instead of covering it: the
  tab bg and panel bg are different surfaces, so overlapping showed a
  color seam; the hairline now doubles as the tab's right edge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@isundaylee isundaylee changed the title Fix ledger tab alignment and drop its off-token shadow Clean up the ledger bookmark tab: alignment, shadow, icon-only design Jul 11, 2026
Generous vertical padding around the lone icon so the tab reads as a
bookmark riding the border rather than a floating square button.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sidebarSizing?: 'fit' | 'fill'
// Accessible name for the mobile drawer toggle button (and visible label for
// the desktop bookmark tab).
// Accessible name for the mobile drawer toggle button and the desktop

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

If it's just an accessible name, should it still be a React node type?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Also, is this even used anymore?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Still used — it's the aria-label for both the mobile drawer toggle and the desktop tab, and gates rendering the drawer toggle. But with the visible label gone there's no reason for ReactNode: tightened to string and dropped the typeof checks in 5bc76ac.

It is only an accessible name now that the tab is icon-only; still used
for the drawer toggle / tab aria-labels and the toggle's render gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@isundaylee isundaylee merged commit 47b17b0 into main Jul 11, 2026
1 check passed
@isundaylee isundaylee deleted the fix-alignment branch July 11, 2026 07:44
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