Skip to content

fix(fortal): start the tooltip fade on leave and give alert dialogs Fortal motion - #684

Open
chrishiguto wants to merge 7 commits into
fortal-refresh/wb-fix-5-button-pressfrom
fortal-refresh/wb-fix-6-dialog-tooltip
Open

chrishiguto wants to merge 7 commits into
fortal-refresh/wb-fix-5-button-pressfrom
fortal-refresh/wb-fix-6-dialog-tooltip

Conversation

@chrishiguto

@chrishiguto chrishiguto commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Why

Two overlay timings the widgetbook pass flagged: tooltips held for 100ms after the pointer left before they began to fade, and the alert dialog story had no Fortal motion because only plain dialogs had a Fortal entry point.

Scope

  • fortalRouteTransition (theme/control_styles.dart) wraps a route's transition in the inherited themes captured between the call site and the navigator the route is pushed on (InheritedTheme.capture, as Flutter's showDialog carries its Theme). showFortalDialog, showFortalAlertDialog, showFortalBottomSheet and showFortalDrawer use it. With the theme inside home and the route on the root navigator, the scrim and panel threw "No MixScope found" and no dialog showed: the widgetbook's dialog and alert dialog stories did exactly that.

  • fortalTooltipStyle sets dismissDuration to zero, so the 100ms fade starts when the pointer leaves.

  • showFortalAlertDialog: showRemixAlertDialog with the scrim, panel motion and reduced-motion timing of showFortalDialog. The alert role, dismissal and focus stay Remix's. The alert dialog story uses it.

  • Tests: the tooltip resolves a zero dismiss delay; the alert dialog takes the clear barrier and the Fortal scrim and stays up on a scrim tap.

Tradeoffs

  • The fix sits in the four showFortal* helpers rather than in the stories, because every app whose FortalTheme sits below its navigator (a theme inside home, or around one page) hit the same error; stories can keep using the root navigator.
  • FortalTheme was already an InheritedTheme with a wrap, so only the capture was missing. Remix's own showRemixDialog still carries only the Mix scope into the dialog body.

Blast Radius

  • Additions: fortalRouteTransition.

  • Fortal dialogs, alert dialogs, bottom sheets and drawers pushed from below a FortalTheme now take that theme (tokens, high contrast, brightness) and the call site's text style instead of throwing. Routes pushed from inside a theme that sits above the navigator are unchanged: nothing is captured.

  • Additions: showFortalAlertDialog.

  • Fortal tooltips close as soon as the pointer leaves the trigger, with no grace to move onto the bubble.

  • Registry templates and mirrors for tooltip and dialog.

Verification

  • route_theme_capture_test.dart mounts the theme below the navigator and opens each of the four routes; all four throw "No MixScope found" without the capture.

  • Release web build in Chromium: the Dialog and Alert Dialog stories open (Revoke access; Cancel and Delete project) with no console error. Before, both greyed the page and logged "No MixScope found".

  • Without the change the tooltip test fails (the delay resolves to null, so Remix's 100ms applies).

  • cd registry_source && flutter test; demo and dashboard suites.

@chrishiguto
chrishiguto force-pushed the fortal-refresh/wb-fix-5-button-press branch from 97a1112 to 20b7c05 Compare December 2, 2026 19:34
@chrishiguto
chrishiguto force-pushed the fortal-refresh/wb-fix-6-dialog-tooltip branch from c72d29c to d7e7948 Compare December 2, 2026 19:34

This branch has not been deployed

No deployments
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