Skip to content

Commit c6c3f9c

Browse files
authored
feat(mix_tailwinds): verified Tailwind parity with functional API and web showcase (#1009)
1 parent 6f3770d commit c6c3f9c

90 files changed

Lines changed: 14492 additions & 2255 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,23 @@ jobs:
4949
melos-commands: |
5050
melos run schema:inventory
5151
melos run analyze:dart
52+
53+
showcase-tool:
54+
name: Showcase Tool Tests
55+
runs-on: ubuntu-latest
56+
defaults:
57+
run:
58+
working-directory: packages/mix_tailwinds/tool/visual-comparison
59+
steps:
60+
- uses: actions/checkout@v4
61+
- uses: actions/setup-node@v4
62+
with:
63+
node-version: 22
64+
cache: npm
65+
cache-dependency-path: packages/mix_tailwinds/tool/visual-comparison/package-lock.json
66+
- name: Install Node dependencies
67+
run: npm ci
68+
- name: Install Chromium
69+
run: npx playwright install --with-deps chromium
70+
- name: Run showcase tool tests
71+
run: npm test

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.pyc
66
*.swp
77
.DS_Store
8+
.context/
89
.atom/
910
.buildlog/
1011
.history
@@ -131,3 +132,9 @@ website/public/previews/
131132
# Playwright
132133
website/playwright-report/
133134
website/test-results/
135+
136+
# The mix_tailwinds example has a hand-authored web showcase. Keep its source
137+
# in version control while excluding parity evidence generated during builds.
138+
!packages/mix_tailwinds/example/web/
139+
!packages/mix_tailwinds/example/web/**
140+
packages/mix_tailwinds/example/web/generated/

melos.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ categories:
2929
- packages/mix
3030
- packages/mix_protocol
3131
- packages/mix_tailwinds
32+
- packages/mix_tailwinds/example
3233
- packages/mix_chart
3334
- packages/mix_chart/example
3435
- packages/mix/example

packages/mix_tailwinds/ADAPTATION_PARITY_REPORT.md

Lines changed: 0 additions & 210 deletions
This file was deleted.

packages/mix_tailwinds/CHANGELOG.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,58 @@
11
## Unreleased
22

3+
- Fixed `self-start`, `self-end`, and `self-center`, which silently did nothing
4+
whenever the container carried an `items-*` utility. A flex holding a
5+
self-aligned child now renders through a `RenderFlex` that offsets those
6+
children after it has measured its cross axis, so the override also works in
7+
the common case of a row nested inside a column.
8+
- **Breaking:** `TwConfig.standard()` now contains only Tailwind CSS 4.3.1
9+
defaults. The fixture-only `brand-500`, `card` spacing/radius, `3xl`
10+
breakpoint, and `shadow-card` values were removed; add project values with
11+
`TwConfig.copyWith` or explicit Mix composition.
12+
- **Breaking (experimental alpha):** Removed `TwPressable` in favor of `Button`;
13+
rename `onPress` to `onPressed`. A null `onPressed` disables the control
14+
unless `onLongPress` supplies an action, and semantics are always button
15+
semantics. Its margin stays outside the pressed, tappable, and semantic
16+
border box.
17+
- Added class-first lowercase convenience functions for `Div`, text, headings,
18+
`Button`, `TwIcon`, and `TruncatedP`. They return the concrete uppercase
19+
widgets; use those const-capable constructors for advanced options.
20+
- `H1` through `H6` now expose matching Flutter semantics heading levels 1
21+
through 6.
22+
- Generated every supported default theme namespace from a checked-in,
23+
versioned Tailwind 4.3.1 snapshot, including the complete stock palette and
24+
corrected radii, blurs, font line heights, leading, and tracking values.
25+
- Resolve `tracking-*` em values against the final font size and preserve an
26+
explicit `leading-*` over font-size defaults in either class order, including
27+
inherited default text styles.
28+
- Fixed nested interaction variants, routed `focus-visible` through input
29+
modality, and removed the non-Tailwind `theme-midnight` dark-mode alias.
30+
- Fixed fixed/fraction/full/auto responsive width behavior under stretched
31+
Flutter constraints. Responsive `w-auto` and `h-auto` now clear earlier
32+
fixed constraints explicitly.
33+
- Visual comparisons now enforce per-example, per-width acceptance contracts
34+
and generate a filterable, browser-smoked HTML light-table report after
35+
successful and failed runs.
36+
- Added a source-backed web showcase for five product-scale examples with
37+
Tailwind/Flutter code comparison, published parity evidence, linkable
38+
viewports, and one-engine single/multi-view Flutter embedding modes. Showcase
39+
builds reject incomplete, malformed, or stale parity evidence by validating
40+
the canonical viewport set and a content fingerprint of their source inputs.
341
- **Breaking (experimental alpha):** Removed the legacy `TwResolver`, the
442
`wrapDefaultTextStyle` styler extensions, and unused `TwConfig` lookup
543
helpers. Use `TwParser`, standard Mix composition, and the public config
644
maps instead.
45+
- **Breaking (experimental alpha):** Removed the unused semantic AST and plugin
46+
registry that were previously exported from `tw_semantic.dart`.
747
- Restored the hosted `mix: ^2.1.0` dependency so the package remains
848
publishable by the repository release workflow.
9-
- Report unsupported `basis-*` flex item utilities through `onUnsupported`
49+
- Added structured `TwDiagnostic` reporting through `onDiagnostic`; ignored
50+
adaptations and unsupported candidates no longer disappear silently. The
51+
token-only `onUnsupported` callback remains as a deprecated shim.
52+
- Resolve conflicting utilities in canonical registry order across translated
53+
styles and constraint-aware widget behavior, so class-string order no longer
54+
changes base, variant, flex-axis, gap, or self-alignment output.
55+
- Report unsupported `basis-*` flex item utilities through `onDiagnostic`
1056
instead of silently ignoring fraction, full, arbitrary, or unknown values.
1157
- Keep supported `basis-auto` and spacing-scale basis utilities quiet while
1258
preserving the existing pixel-basis runtime behavior.

0 commit comments

Comments
 (0)