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(cc): no classes styling the same CSS properties are set on one element #274

Merged
merged 24 commits into from
Aug 13, 2024

Conversation

felicia-haggqvist
Copy link
Contributor

Description

This PR ensures no classes styling the same CSS properties are being set on the same HTML element.

BREAKING CHANGE:

  • Expandable info prop has been deprecated and removed

Testing

Tested the changes in Chrome, Safari and Firefox

BalbinaK and others added 20 commits May 30, 2024 11:08
* fix(tabs): simplify component classes

* fix(tabs): remove falsy children to show correct bottom border

* chore: install component-classes-cleanup branch version of @warp-ds/css
* fix(select): clean up component classes

* fix: add disabled + readOnly to props.tsx + add ReadOnly story to Select

* fix: fix typo for readOnly prop

* fix: add handleKeyDown to disable space for when readOnly prop is true

* fix: run pnpm lint

* fix: remove hyphen from readonly

* fix: refactor classes

* fix: add SelectProps type to props
* fix(steps): clean up classes

* fix(steps): change default value for horizontal and right to false instead of undefined

* fix(steps): remove default value from line 16

* fix(step): update step classnames

* fix(step): remove [] from classNames

* fix(steps): refactor classNames for unordered list

* fix(step): rename ccStep.step to ccStep.container

* fix(step): update classNames

* fix(step): reorder classes
* fix(combobox): add unit-tests

* fix(combobox): add more tests

* fix(combobox): add more tests

* fix(combobox): refactor tests

* fix(combobox): fix lint warning and remove redundant async in tests

* fix(combobox): move option classes to a function and rename classes

* fix(combobox): set option to type of OptionWithIdAndMatch in optionClasses

* fix(combobox): fix linting issue and rename a test

* fix: update to latest of css component-classes-cleanup
* fix(slider): clean up classes

* fix(slider): use new activeTrackEnabled class

* fix(slider): move classes to functions

* fix: update snapshot tests for Steps and Slider

* fix(slider): fix linting issue

* fix(slider): update to latest version of css component-classes-cleanup
* fix(expandable): clean up classes

* fix(expandable): remove redundant classes that are elements (lit) specific

* fix(expandable): refactor toggleExpandable() and chevronIcon()

* fix(expandable): move classes to separate functions

* fix(expandable): add info to contentClasses

* fix(expandable): remove deprecated info prop

* fix(expandable): remove info from props.tsx

BREAKING CHANGE: info prop has been removed

* fix(expandable): replace paddingTop with contentWithTitle

* fix(expandable): revert removing setTimeout and showChevronUp
* fix(card): clean up classes

* fix(card): replace nested ternary expressions with an if-statement for better readability

* fix(card): update test for rendering selected card correctly

* fix(card): update to latest version of css component-classes-cleanup

* fix(card): remove backgroundClass

* fix(card): revert changing test

* fix(card): update to latest version of css component-classes-cleanup

* fix(card): refactor combined ternary expression into two
* fix: update classnames

* refactor: clean up components

Use same way of using classNames and remove repetitive code

* refactor: clean up helper components

Use same way of using classNames and rename helpText.tsx to help-text.tsx

* fix: remove redundant check for className in tabs

* fix: revert moving classes to variables for better readability

* fix: revert removing !! from props.left

* fix(tabs): update tests
* fix(switch): clean up classes

* refactor(switch): update trackClasses and remove redundant handleClick function

* fix: update to latest version of css component-classes-cleanup
* fix(tabs/steps): rename container keys in component classes

* refactor: update to latest version of css component-classes-cleanup

---------

Co-authored-by: felicia-haggqvist <felicia.haggqvist@schibsted.com>
@felicia-haggqvist felicia-haggqvist requested a review from a team August 12, 2024 12:19
@felicia-haggqvist felicia-haggqvist self-assigned this Aug 12, 2024
Copy link
Contributor

github-actions bot commented Aug 12, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-08-13 12:33 UTC

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 694c156 into next Aug 13, 2024
14 checks passed
@felicia-haggqvist felicia-haggqvist deleted the component-classes-cleanup branch August 13, 2024 12:33
github-actions bot pushed a commit that referenced this pull request Aug 13, 2024
# [2.0.0-next.4](v2.0.0-next.3...v2.0.0-next.4) (2024-08-13)

### Bug Fixes

* **cc:** no classes styling the same CSS properties are set on one element ([#274](#274)) ([694c156](694c156))

### BREAKING CHANGES

* **cc:** Expandable info prop has been removed
github-actions bot pushed a commit that referenced this pull request Aug 14, 2024
# [2.0.0](v1.6.0...v2.0.0) (2024-08-14)

### Bug Fixes

* **cc:** no classes styling the same CSS properties are set on one element ([#274](#274)) ([694c156](694c156))
* remove deprecated classes ([#252](#252)) ([d4ffe4c](d4ffe4c))
* support danish locale ([#256](#256)) ([e0e9124](e0e9124))
* update dependencies ([#259](#259)) ([d1a546d](d1a546d))

### BREAKING CHANGES

* **cc:** Expandable info prop has been removed
* Clickable prop, ccBox.infoClickable, ccBox.neutralClickable and
ccBox.borderedClickable classes have been removed from the box component.

* fix(switch): remove deprecated switch class

switch class has been deprecated and removed from @warp-ds/css, and should also be removed from the
switch component.
* switch class has been removed from the switch component.

* fix: update @warp-ds/css to latest next-version

we have recently made a major prerelease of the @warp-ds/css and have removed deprecated tokens and
classes, that needs to also be updated in the react-repo

* fix: make @warp-ds/css also as a peerDependency and bump to latest next-version

* fix(textarea): remove deprecated error prop

error prop has been deprecated for a while. Use invalid prop instead
* error prop has been removed and replaced by invalid prop

* fix(textfield): remove deprecated error prop

error prop has been deprecated for a while. Use invalid instead.
* error prop has been removed and replaced by invalid prop

* fix(card): remove deprecated onClick prop

onClick prop has been deprecated for a while. Use instead Clickable component to handle click events
in Cards
* onClick prop has been removed and its tests

* fix(card): fix linting issues and remove commented out tests for onClick prop

* fix: update pnpm/action-setup@v2 to v4

* fix: bump stylesheet to v2
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.

3 participants