refactor(remix)!: generate callable component stylers - #152
Merged
Conversation
BREAKING CHANGE: Explicit Remix*StylerRemixHelpers call extension references are removed; invoke the styler instance directly.
4 tasks
leoafarias
marked this pull request as ready for review
August 14, 2026 13:49
leoafarias
added a commit
that referenced
this pull request
Aug 14, 2026
Adopts the `@MixableSpec(target:)` generation that landed in #152. The hand-written `RemixLinkStylerRemixHelpers` extension is deleted; the generator now emits an identical `LinkStyler.call` into link.g.dart, so the constructor and its callable form can no longer drift apart. link_style.dart held nothing but that extension, so it goes entirely, the way badge's and button's did. The style files that survive #152 keep other helpers besides `call`. Adds LinkStyler to the generated-call test's non-generic group. It needs a label because RemixLink asserts on having a name.
leoafarias
added a commit
that referenced
this pull request
Aug 14, 2026
Adds a first-class Link component to `remix` — `LinkSpec`, the generated `LinkStyler`, and `RemixLink` built on naked_ui's `NakedLink` — and rebuilds `FortalLink` on top of it, replacing the hand-rolled `NakedButton` plus outer `Semantics(link:)` workaround. A link publishes the Link role and activates on Enter and Numpad Enter, where a button publishes the Button role and also takes Space. `onPressed: null` and `enabled: false` mean the same thing, matching Flutter's convention that a null callback disables a control; ordinary text is the right tool for prose that was never meant to navigate. `fortalLinkStyle` absorbs the old `_fortalInteractiveLinkStyle` and returns the complete style, so `FortalLink` sheds its mirrored focus field, its duplicated inert widget path, and its `excludeSemantics` workaround, and no longer branches on actionability. Requires `NakedLink`, released in naked_ui 1.0.0-beta.11 (conceptadev/naked_ui#65). The floor is raised in both package pubspecs and in the Fortal parity contract, which move together by design. The styler adopts the `@MixableSpec(target:)` generation from #152, so `LinkStyler.call` is generated rather than hand-written. Closes #137 Closes #143 BREAKING CHANGE: four changes to `remix_fortal` link behaviour. 1. `FortalLink` no longer activates on Space. Space belongs to the Button role; a link takes Enter and Numpad Enter, matching an anchor on the web. Use `FortalButton` where Space should activate. 2. `fortalLinkStyle` returns `LinkStyler` instead of `BadgeStyler`, and its `hovered` and `focused` parameters are gone. They were the only raw widget-state parameters on any Fortal recipe and existed solely to build the variant snapshots the recipe now assembles itself. Pass `actionable` and let the returned style resolve its own states. 3. A disabled `FortalLink` no longer publishes the Link role, because `NakedLink` gates the role on effective-enabled. This covers `onPressed: null` as well as `enabled: false`: a callback-less link now reports `hasEnabledState` and announces as unavailable, where it previously published a plain text node with no interactive metadata. 4. A disabled `FortalLink` is no longer reachable under `NavigationMode.directional`. The old `NakedButton`-backed recipe left disabled controls traversable on directional platforms; `NakedLink` does not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Use Mix's
@MixableSpec(target:)support to generate callable component-styler methods from the corresponding Remix widget constructors.Styler.call(...)forwarders and remove 14 call-only part filesDataTableStylersurface while preserving generic types and constructor defaultstransitionBuildercall contract by normalizingnullto the component default in the widget constructormix_generatorto the reviewed commit from conceptadev/mix#1025 so this validation branch is reproducibleOrdinary
styler.call(...)and callablestyler(...)usage remains source-compatible. Explicit references to the oldRemix*StylerRemixHelperscall extensions must instead invoke the styler instance; this is marked as a breaking change.The upstream generator work remains unmerged, so this branch uses an exact-SHA override to keep the workspace reproducible. The Remix integration also exposed an upstream edge case for constructor defaults that reference a target class's static member; Accordion avoids invalid generated output while retaining its existing behavior. The override should be removed once the generator support ships.
Validation
flutter analyzemelos run ci --no-select, including clean generation checks, documentation validation, Fortal parity, and 3,028 Flutter testsRelated Issues
Checklist
Note: Updating the
pubspec.yamlandCHANGELOG.mdis not required. These are handled automatically during the release process.///).Breaking Change
Does this PR require users of the package to manually update their code?