Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename classes utility function to joinClasses in order to reduce naming confusion #859

Merged
merged 4 commits into from Apr 22, 2024

Conversation

haukesomm
Copy link
Collaborator

@haukesomm haukesomm commented Apr 19, 2024

This PR adds a new joinClasses function to replace the current classes function in order to minimize naming confusion.
The classes function gets deprecated.

Motivation

The current name was meant to be short, but as it seems quite often it competes with parameters having the same name, which are passed in from higher call sites. This might look confusing:

classes(classes, "... some local added classes", ...)

Migration

Use the added joinClasses function over the now deprecated classes function. This can be done automatically via IntelliJ.

Ideally, optimize your imports after replacing the respective calls.

Closes #828

Changes include:
- Add `joinClasses` as a drop-in replacement for the `classes` function
- Deprecate `classes` function
- Migrate existing code towards the new `joinClasses` function
@haukesomm haukesomm added this to the 1.0-RC18 milestone Apr 19, 2024
@haukesomm haukesomm self-assigned this Apr 19, 2024
@haukesomm haukesomm changed the title Rename classes utility function to joinClassNames in order to reduce naming confusion Rename classes utility function to joinClassNames in order to reduce naming confusion Apr 19, 2024
@haukesomm haukesomm added the headless All about headless components and foundations label Apr 19, 2024
Copy link
Collaborator

@Lysander Lysander left a comment

Choose a reason for hiding this comment

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

Please watch out for usage in documentation (*.md) files - I found two occurences inside the headless components (radiogroup.md and tabgroup.md)

@haukesomm haukesomm changed the title Rename classes utility function to joinClassNames in order to reduce naming confusion Rename classes utility function to joinClasses in order to reduce naming confusion Apr 19, 2024
@haukesomm haukesomm merged commit b91675e into master Apr 22, 2024
2 checks passed
@haukesomm haukesomm deleted the haukesomm/joinClassNames branch April 22, 2024 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api improvement headless All about headless components and foundations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename classes utility function to joinClassNames in order to reduce naming confusion
2 participants