Skip to content

fix(ui): fix class reactivity and add new cn utility for classes#996

Merged
dev-rb merged 5 commits intomainfrom
rahul/fix-core-ui-class-handling
Jan 14, 2026
Merged

fix(ui): fix class reactivity and add new cn utility for classes#996
dev-rb merged 5 commits intomainfrom
rahul/fix-core-ui-class-handling

Conversation

@dev-rb
Copy link
Copy Markdown
Contributor

@dev-rb dev-rb commented Jan 14, 2026

Summary

This PR adds clsx as a dependency (although we probably could just inline it since it's small) and introduces a new cn utility for writing complicated classes and then piping them through twMerge to be merged.

Also:

  • Fixes an issue where the Button component's class property was not reactive
  • Removes classList use from Button in favor of using the cn utility. This also removes the need for using ! (important) after certain classes

Screenshots, GIFs, and Videos

@dev-rb dev-rb marked this pull request as ready for review January 14, 2026 16:39
@dev-rb dev-rb requested a review from a team as a code owner January 14, 2026 16:39
@dev-rb dev-rb requested a review from nickisnoble January 14, 2026 16:40
@github-actions
Copy link
Copy Markdown

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Jan 14, 2026


Code review

No issues found. Checked for bugs and CLAUDE.md compliance.


@claude
Copy link
Copy Markdown
Contributor

claude bot commented Jan 14, 2026

Code review

I found one issue that should be addressed:

Missing tests

The CLAUDE.md requires tests for changes, especially bug fixes:

Testing - Write tests for your changes. When fixing bugs or regressions, identify the issue with a test before fixing it.

This PR fixes a class reactivity bug in the Button component but does not include any tests to:

  • Verify the bug fix works correctly
  • Prevent regression of the reactivity issue
  • Test the new cn utility function

Please add tests for:

  1. The Button component's class reactivity (to verify the bug is fixed)
  2. The new cn utility function (to ensure proper class merging behavior)

Copy link
Copy Markdown
Contributor

@sedson sedson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have seen the truth

@dev-rb dev-rb merged commit 3ae307b into main Jan 14, 2026
37 of 42 checks passed
@dev-rb dev-rb deleted the rahul/fix-core-ui-class-handling branch January 14, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants