refactor(remix)!: one spelling per styler operation - #132
Merged
Conversation
Remix stylers now offer one way to express a style: the canonical primitive plus Dart dot shorthand. The convenience layer that duplicated it is gone. `RemixBoxStylerConvenience` carried 68 methods — paddingAll, borderRadiusTop, borderAll, marginX, shapeCircle and the rest — each a one-line forward to the primitive already declared on `RemixBoxStylerAnchors`. Every call site moves to `padding(.all(x))`, `borderRadius(.circular(x))`, `border(.top(...))`, and their siblings, which is the form the Mix styler policy documents and the only form that also expresses mixed corners and directional insets. The chained BorderSideMix setters take non-nullable values, so the handful of wrappers that forward optional color, width, style, and strokeAlign keep the compound primitive with the constructor inside rather than forcing a default. RemixBoxEffectsMix gains named factories and matching chainable instance methods for backdropBlur, outline, outlineOffset, behindContent, and overContent, so `containerEffects(.backdropBlur(64).outlineOffset(2))` reads as one value. The raw `.create()` constructor is untouched: it takes Props directly, which is what widget internals and the dialog's context-resolved viewport insets need. tool/validate_docs.dart rejects the retired forms and now also scans packages/*/lib, which it previously skipped entirely. BREAKING CHANGE: RemixBoxStylerConvenience and its 68 extension methods are removed from the public API. Replace `paddingAll(x)` with `padding(.all(x))`, `borderRadiusAll(r)` with `borderRadius(.all(r))`, `borderAll(color: c)` with `border(.all(.color(c)))`, and the same pattern for the margin, shape, shadow, and constraints helpers.
`BoxBorderMix.color(v)` is defined as `BorderMix.all(BorderSideMix.color(v))`, so a border identical on every side needs no `.all(...)` around a side the shorthand builds anyway. 23 call sites lose the wrapper. `.all(...)` stays where it earns its place: a specific side, a prebuilt side, and — the case that matters here — forwarding optional values, since the chained setters take non-nullable arguments. `fortalFocusRing` keeps the constructor form for exactly that reason: tabs pass `strokeAlign: null` deliberately to let `BorderSide` supply its own default, which `.strokeAlign(double)` cannot express. Documented upstream in conceptadev/mix#1018 so the styler policy and this codebase agree.
Every handwritten helper that re-spelled an operation the generated surface already exposes is gone. A canonical operation now has exactly one spelling. ButtonStyler and IconButtonStyler lose their last 12 helpers, including modifierRotate, whose body was literally wrap(.rotate(...)). Twenty-two other components lose the same aliases they carried: backgroundColor, foregroundColor, flex, square, and sizeWH. Every generated color() was verified to target the identical slot its alias did, including AccordionStyler.color, which forwards to trigger rather than a root container. Call sites were migrated from analyzer output rather than by textual rename: Mix's own TextStyler.backgroundColor sets the text background, not the foreground, so a blind rename would have silently changed behavior at those sites. Four extensions left empty by the removal are deleted. Also re-vendors the mix skill, which now documents that a uniform border skips the side wrapper.
5 tasks
# Conflicts: # apps/dashboard/lib/shell/sidebar.dart
# Conflicts: # apps/demo/lib/components/accordion.dart # docs/components/accordion.mdx # packages/remix/example/api/accordion.0.dart # packages/remix_fortal/lib/src/recipes/accordion.dart
…llings The accordion panel container arrived after this branch migrated its call sites, so its documentation and API example still used the retired padding and border-radius conveniences. The validator on this branch is what caught them.
This was referenced Aug 12, 2026
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.
Makes Remix stylers expose one spelling per operation: generated canonical primitives plus Dart dot shorthand, without handwritten aliases that duplicate them.
Removed duplication
RemixBoxStylerConveniencelayer (paddingAll,borderRadiusTop,marginX,borderAll,shapeCircle, and related aliases).backgroundColor,flex,foregroundColor,square,sizeWH, and modifier helpers.titleColor,labelFontSize, andleadingIconSize; those name child slots that have no equivalent parent primitive.Representative replacements:
.paddingAll(16).padding(.all(16)).paddingX(8).padding(.horizontal(8)).borderRadiusAll(r).borderRadius(.all(r)).borderRounded(12).borderRadius(.circular(12)).borderAll(color: c, width: w).border(.color(c).width(w)).sizeWH(w, h).size(w, h)Optional
BorderSideMixfields still use its constructor; chained setters are only used when values are non-null.RemixBoxEffectsMix and
.create()RemixBoxEffectsMixgains matching named factories and chainable methods for backdrop blur, outline, outline offset, and the behind/over-content layers..create()remains the rawProplayer. In particular, the dialog's context-resolved viewport insets requirePaddingModifierMix.create(padding: Prop.token(...)): the friendly Mix modifier API has no whole-EdgeInsetsGeometrytoken parameter. This is correct and load-bearing, not a Remix workaround or merge blocker. A future Mix ergonomic API could shorten that one call site, but no upstream fix is required for these PRs.Enforcement
tool/validate_docs.dartnow rejects retired forms across docs, app/example sources, package libraries, consumer Markdown, and workspace tests. Test scanning matters because Mix still exposes some of the old convenience spellings, so those calls compile and cannot be left to the analyzer alone.The newly merged chart gallery exposed the intended value of that rule: five new retired calls were migrated immediately, and one stale wrapper comment was corrected. Current branch validation covers 32 MDX files, 117 Dart snippets, 125 app/example sources, 170 package library sources, 155 test sources, and 12 consumer Markdown files.
Verification
#130 → #133 → #132: analyzer clean and full CI greenReview and integration notes
!: public styler aliases are removed.border(.color(c).width(w)), without a redundant side wrapper).FortalTextwith this PR's.padding(.all(...)). Resolve the demo and Fortal accordion recipe in favor of feat(remix): give the accordion a panel container #133's newer per-item panel anatomy.