Skip to content

Fix boxel-ui docs scroll behavior and other improvements#5528

Merged
burieberry merged 8 commits into
mainfrom
cs-12202-fix-ui-docs-scroll
Jul 17, 2026
Merged

Fix boxel-ui docs scroll behavior and other improvements#5528
burieberry merged 8 commits into
mainfrom
cs-12202-fix-ui-docs-scroll

Conversation

@burieberry

@burieberry burieberry commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Fixes scroll issues in the boxel-ui Freestyle docs, improves the icons grid, reworks the mobile nav into a proper drawer, and adds theme importing.

Scroll fixes

  • Patch FreestyleMenu#scrollActiveItemIntoView so the nav's scroll-spy scrolls only the nav's own container instead of using scrollIntoView, which was hijacking the in-progress page scroll whenever the active menu item was off-screen.
  • Set overflow: visible on the guide's CardContainer — its overflow: hidden made it the containing scroll box, so the sticky nav sidebar never stuck to the viewport.
  • Set overflow: visible on .FreestyleGuide-content too: its vendor overflow: auto made it the containing scroll box for sticky descendants, but the page body is what actually scrolls (the column is never height-constrained), so nothing inside could stick. Also cap it with min-width: 0; max-width: 100% so wide content (tables, code) can never push the column past its row.

Mobile nav drawer

  • The nav is now a modal drawer on small screens: closed by default (users land on scrollable content), opened via the hamburger.
  • Translucent backdrop that dismisses on tap; selecting a menu entry also closes the drawer. Body scroll-lock applies only while the drawer is open.
  • Slides in with a transform transition; full-height inset positioning replaces the old top: 70px magic numbers; the hamburger reflects state via aria-expanded.

Icons grid improvements

  • Added a "Show All" toggle that removes the grid's max-height so the full icon set can be browsed without the inner scroll area (including on mobile, where the capped height is now a max-height).
  • The grid header (filter, Show All, count) is sticky while scrolling through the icons, with a shadow that appears only while pinned (IntersectionObserver sentinel — no scroll listeners).
  • Toggling Show All off scrolls back to the top of the icons section instead of stranding the page deep in collapsed content.
  • Replaced the raw filter <input> with BoxelInput + FieldContainer, and swapped hardcoded hex colors for theme variables (var(--border), color-mix hover).

Themes

  • Consolidated theme definitions into tcn-themes.ts / cs-themes.ts barrels and added new themes (Amethyst Haze, Sage Garden, Boxel Brand Guide, …); display names are derived from the export names (SoftPop → "Soft Pop").
  • New "Import Theme" panel: paste a theme export (e.g. from tweakcn), and only its :root / .dark variable blocks are kept — @theme blocks and resets are stripped. Apply is disabled until a valid block is present; names are de-duplicated.
  • Fonts: the static Google Fonts link now covers every family the built-in themes reference, and imported themes get their --font-* families loaded dynamically (one link per family, so unknown fonts fail silently to their fallback stacks).

Other polish

  • Theme settings header: flattened the layout into three inline FieldContainers (Theme / Cycle Themes / Dark Mode) and dropped the floating-position media-query CSS.
  • Small typography tweaks (font-size tokens for subtitle, descriptions, mobile sizes) and a themed even-row color for the API/CSS-vars tables.

@burieberry
burieberry marked this pull request as ready for review July 16, 2026 22:33

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

Copy link
Copy Markdown

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: 9450509c68

ℹ️ 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".

Comment thread packages/boxel-ui/test-app/app/components/icons-grid.gts Outdated
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files  ±0      1 suites  ±0   3h 11m 59s ⏱️ + 5m 32s
3 548 tests ±0  3 533 ✅ ±0  15 💤 ±0  0 ❌ ±0 
3 567 runs  ±0  3 552 ✅ ±0  15 💤 ±0  0 ❌ ±0 

Results for commit 4f0af7d. ± Comparison against earlier commit 11cfc87.

Realm Server Test Results

    1 files  ±0      1 suites  ±0   17m 30s ⏱️ +50s
1 880 tests ±0  1 880 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 959 runs  ±0  1 959 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 4f0af7d. ± Comparison against earlier commit 11cfc87.

@burieberry
burieberry force-pushed the cs-12202-fix-ui-docs-scroll branch from 9450509 to 11cfc87 Compare July 17, 2026 16:27
@burieberry burieberry changed the title Fix boxel-ui docs scroll behavior Fix boxel-ui docs scroll behavior and other improvements Jul 17, 2026
@burieberry
burieberry requested a review from a team July 17, 2026 17:14

@backspace backspace left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don’t think this is blocking and maybe just a side-effect of the preview deployment but switching between icons and components causes a full refresh for me:

Image

Trusted clicks run a microtask checkpoint between listeners, so the
tracked-state mutation in ember-freestyle's expandSection re-renders the
menu and tears down the clicked LinkTo before its own click handler can
preventDefault — the browser then follows the href as a full page
reload. Deferring the mutation with setTimeout keeps the LinkTo alive
through the dispatch so section switches stay client-side transitions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@burieberry
burieberry merged commit d67d98d into main Jul 17, 2026
100 of 102 checks passed
@burieberry
burieberry deleted the cs-12202-fix-ui-docs-scroll branch July 17, 2026 21:47
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