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

fix: update classnames #187

Merged
merged 14 commits into from
Aug 7, 2024

Conversation

felicia-haggqvist
Copy link
Contributor

@felicia-haggqvist felicia-haggqvist commented Aug 2, 2024

Changes:

  • Update class names that have been renamed in component-classes (this also includes class name changes to the w-switch component that was changed in this PR in the @warp-ds/css repo)

  • Standardize the method for applying class names across all components.
    Before: Different components used various methods (arrays, objects) to apply class names, resulting in inconsistent code and potential confusion.
    For example:
    const attentionClasses = computed(() => ({ [props.attentionClass]: true, [ccAttention.notCallout]: !props.callout, }));
    After: All components now consistently use arrays to define class names, which will improve consistency and readability.
    For example:
    const attentionClasses = computed(() => [props.attentionClass, !props.callout && ccAttention.notCallout]);

How to test

Either link this branch with @warp-ds/css (fix/cleanup-switch-toggle-classes branch) or replace this for @warp-ds/css dependency in package.json: github:warp-ds/css#component-classes-cleanup with this github:warp-ds/css#fix/cleanup-switch-toggle-classes

@felicia-haggqvist felicia-haggqvist self-assigned this Aug 2, 2024
@felicia-haggqvist felicia-haggqvist changed the title Fix/update classnames fix: update classnames Aug 2, 2024
@felicia-haggqvist felicia-haggqvist requested a review from a team August 6, 2024 07:33
@felicia-haggqvist felicia-haggqvist marked this pull request as ready for review August 6, 2024 08:13
Copy link
Contributor

@BalbinaK BalbinaK left a comment

Choose a reason for hiding this comment

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

Cool stuff! Just left a few comments 👇

components/button/w-button.vue Outdated Show resolved Hide resolved
components/forms/w-textarea.vue Show resolved Hide resolved
components/switch/w-switch.vue Outdated Show resolved Hide resolved
components/tabs/w-tab.vue Outdated Show resolved Hide resolved
test/wTabs.test.js Show resolved Hide resolved
Copy link
Contributor

@BalbinaK BalbinaK left a comment

Choose a reason for hiding this comment

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

LGTM

@felicia-haggqvist felicia-haggqvist merged commit 430ae7b into component-classes-cleanup Aug 7, 2024
4 checks passed
@felicia-haggqvist felicia-haggqvist deleted the fix/update-classnames branch August 7, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants