feat(component): always emit variant suffix in uiButton class#5
Merged
Conversation
A bare `uiButton(text="Save")` previously rendered `<button class="btn">`; it now renders `<button class="btn-primary">`. Sized primary buttons follow the same rule (`size="sm"` → `class="btn-sm-primary"` instead of `class="btn-sm"`). Why: the rendered HTML now self-documents the variant. Inspecting `class="btn"` in DevTools could previously mean either "explicit primary variant" or "the author forgot to set the variant" — those should be visually distinguishable. basecoat-css ships matching selectors for every size×variant combination (`.btn-primary`, `.btn-sm-primary`, `.btn-lg-primary`, `.btn-icon-primary`), so visual rendering is identical to bare `btn`. Discovered during a Wheels Tutorial fresh-VM bake — chapter 8 checkpoint asserted `class="btn btn-primary"` against rendered output, and the silent-skip behavior made the assertion impossible to satisfy. The companion chapter doc fix lands separately in wheels-dev/wheels. Wheels Tutorial Finding #5. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
3 tasks
bpamiri
added a commit
to wheels-dev/wheels-packages
that referenced
this pull request
May 1, 2026
uiButton now always emits the variant suffix in its CSS class (`btn-primary` instead of bare `btn` for the default variant). Sized primary follows the same rule. basecoat-css ships matching selectors so visual rendering is unchanged. Source: wheels-dev/wheels-basecoat#5 Tag: v1.0.5 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
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.
Summary
uiButtonnow always emits the variant suffix in its compound class, including the defaultprimaryvariantuiButton(text=\"Save\")→<button class=\"btn-primary\">(wasclass=\"btn\")size=\"sm\"→class=\"btn-sm-primary\"(wasclass=\"btn-sm\"); same forlgand icon-onlyWhy
Rendered HTML now self-documents the variant. Inspecting
class=\"btn\"in DevTools could previously mean either "explicit primary" or "author forgot to set the variant" — those should be visually distinguishable. basecoat-css ships matching selectors for every size×variant combination (.btn-primary,.btn-sm-primary,.btn-lg-primary,.btn-icon-primary), so visual rendering is identical to barebtn.Source
Discovered during a Wheels Tutorial fresh-VM bake. The chapter-8 "Bonus: wheels-basecoat" checkpoint asserted
class=\"btn btn-primary\"against rendered output; the silent-skip behavior made the assertion impossible to satisfy. The companion chapter doc fix lands separately in wheels-dev/wheels.Wheels Tutorial Finding #5.
Test plan
wheels packages add wheels-basecoat, confirm chapter 8 checkpoint fix(component): $uiBuildId / $uiLucideIcon must be public for PackageLoader #3 (`grep -oE '<button[^>]class="btn[^\"]"[^>]*>Post comment'`) returns a match includingbtn-primary.btn-primaryrule ==.btnrule)🤖 Generated with Claude Code