docs(styling): document and test-prove the recipe caller-append merge contract#146
Conversation
|
Warning Review limit reached
Next review available in: 29 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR locks in and documents Wind’s “caller-append” merge contract for WindRecipe/WindSlotRecipe, showing that caller-provided className is appended last (no dedupe/twMerge) and that conflicts are resolved at parse time via per-family last-wins in WindParser/parsers.
Changes:
- Added a recipe-level test proving the emitted class string preserves both conflicting tokens with caller appended last.
- Added a parser-level test proving the trailing (caller) sizing token wins (
w-fulloverridesw-1/2at parse time). - Documented the contract in user docs and the
wind-uiskill, plus recorded it inCHANGELOG.md.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/recipe/wind_recipe_test.dart | Adds a test proving WindRecipe appends caller className last without merging/deduping. |
| test/parser/parsers/sizing_parser_test.dart | Adds a test proving parse-time last-wins makes appended w-full win over base w-1/2. |
| skills/wind-ui/SKILL.md | Documents the caller-append/no-twMerge recipe contract for the skill surface. |
| doc/styling/wind-recipe.md | Documents the caller-append contract and explains parse-time conflict resolution. |
| CHANGELOG.md | Adds an Unreleased entry describing the newly documented/test-proved contract. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
… note consumer-agnostic Addresses PR review: the parse-time-resolution sentence now cites WindParser.findAndGroupClasses / SizingParser.parse (the recipe rationale reference moves to the no-twMerge sentence where it belongs), and the className-REPLACE anti-pattern note no longer names a specific downstream project.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
What (WIND-1)
Verifies and documents that
WindRecipe/WindSlotRecipealready merge a callerclassNamecorrectly: the recipe only appends the caller className last, and the conflict with a base token is resolved one layer down, at parse time, byWindParser's per-family last-wins. There is intentionally no DarttwMerge/cnport.This PR adds no runtime code. It locks the contract with tests and documents it.
Why
The recipe merge behavior was correct but undocumented, and the "className replaces the recipe" anti-pattern (a consumer bug, not a wind defect) needed to be stated on the record so consumers do not re-implement a twMerge that wind does not need.
Changes
test/recipe/wind_recipe_test.dart: provesWindRecipe(base: 'w-1/2')(className: 'w-full')emitsw-1/2 w-full(caller appended last, order preserved, no dedup).test/parser/parsers/sizing_parser_test.dart: proves the appendedw-fullwins at parse time (widthFactorresolves to1.0).doc/styling/wind-recipe.md,skills/wind-ui/SKILL.md: document the caller-append contract and note the REPLACE anti-pattern lives in consumer components, not wind.Verification
dart analyzeclean,dart formatclean,flutter testgreen.