Skip to content

chore: Upgrade shad to 1.0.2 and fix the menubar menus - #41

Merged
vlidholt merged 1 commit into
mainfrom
chore/shad-1.0.2
Oct 30, 2026
Merged

vlidholt merged 1 commit into
mainfrom
chore/shad-1.0.2

Conversation

@vlidholt

Copy link
Copy Markdown
Contributor

Upgrades shad from 0.99.4 to 1.0.2 (../shad/MIGRATION.md) and fixes the menu regressions that 1.0 brought to the main menu.

shad 1.0 – 1.0.2

  • Fonts: shad no longer bundles fonts. wonky_ui now ships Inter, Geist and Geist Mono (with their OFL licences) as package fonts, and every reference goes through the new WonkyFonts (packages/wonky_ui/<Family>). This covers the theme, charts, Sheets' font list, Write's fonts and tool/prune_web_fonts.dart.
  • Material decoupling (1.0.1): ShadThemeMode replaces ThemeMode. The shell, the preview app and the Drive, Sheets and Write test harnesses wrap their content in ShadMaterial, because super_editor, re_editor, SelectableText and ReorderableListView still need Material.
  • dart fix renames: displayDuration and fallback.
  • The Lucide glyph table is regenerated for lucide_icons_flutter 4.0.1. That version only adds icons.
  • Specs 01, 02, Write 01/06 and Sheets 06 are updated.

Menu fixes

  • Slim, empty menu while closing: shad 1.0 animates menus out, and our menus dropped their items on close. They now keep their last items until the animation ends. This applies to dropdowns, context menus, the popup host and the menubar.
  • Two menubar menus at once: menubar menus now close instantly, through ShadContextMenuTheme.popoverReverseDuration, which 1.0.2 honours. Hovering another title therefore never shows the old menu on top of the new one. Dropdowns and context menus keep the fade.
  • Two highlighted items: focus now follows the pointer, as in Radix menus. An item focused with the keyboard and a hovered item are no longer highlighted together.
  • The lazy max height of a menu is measured only while it is open. A drawer menu that was closing measured an anchor that was already gone (RenderBox was not laid out).
  • Known limitation: hovering an item and then pressing ↓ still highlights both. Fixing that needs shad to stop highlighting on button hover. 0.99 had the same behaviour.

Testing

  • 3 new tests in packages/wonky_ui/test/widgets/menu_test.dart. Each fails without its fix.
  • On shad 1.0.1 locally: wonky_ui and Write passed in full. wonky_app, Sheets, Drive and Slides failed only on golden tests that have no committed reference images; these fail on main too.
  • On 1.0.2: dart analyze is clean, menu_test passes 16/16, and wonky_ui passes 133/133. The other suites are left to CI.
  • Manual browser check of the Write release build.

🤖 Generated with Claude Code

shad 1.0 ships no fonts, so wonky_ui now bundles Inter, Geist and Geist
Mono (with their OFL licences) and every reference goes through
WonkyFonts. 1.0.1 decouples shad from Material: ShadThemeMode replaces
ThemeMode, and the shell, the preview app and the test harnesses wrap
their content in ShadMaterial for the Material widgets we still use
(super_editor, re_editor, SelectableText, ReorderableListView).

The menus are adapted to shad 1.0's exit animation and highlight:
- A closing menu keeps its last items while it animates out, instead of
  a slim, empty menu.
- Menubar menus close at once (ShadContextMenuTheme.popoverReverseDuration,
  honoured since 1.0.2), so switching menus never shows two.
- Focus follows the pointer, as in Radix menus, so a keyboard-focused
  item and a hovered one are never both highlighted.
- The lazy menu max height is measured while open only, as the anchor
  may be gone while the menu closes.

Also regenerates the Lucide glyph table from lucide_icons_flutter 4.0.1
and applies the dart fix renames (displayDuration, fallback).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vlidholt
vlidholt merged commit a7dad41 into main Oct 30, 2026
41 checks passed
@vlidholt
vlidholt deleted the chore/shad-1.0.2 branch October 30, 2026 11:22
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant