sumup-oss / circuit-ui

SumUp's design system for the web
https://circuit.sumup.com
Apache License 2.0
915 stars 129 forks source link

Deprecate Toggle label props #2679

Closed connor-baer closed 3 weeks ago

connor-baer commented 3 weeks ago

Purpose

The Toggle's checkedLabel and uncheckedLabel props were meant to communicate the component's state. They were rendered inside the button. However, users could never perceive them: they're visually hidden and are overridden by the aria-labelledby attribute on the button.

Approach and changes

Definition of done

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
oss-circuit-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 5, 2024 11:31am
changeset-bot[bot] commented 3 weeks ago

🦋 Changeset detected

Latest commit: 4288256724c1c8d1898b0bc038f00fd603f3ee67

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ------------------------------- | ----- | | @sumup/circuit-ui | Minor | | @sumup/eslint-plugin-circuit-ui | Major |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 40.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 86.59%. Comparing base (0dbd4c9) to head (4288256). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/circuit-ui/components/Toggle/Toggle.tsx 40.00% 12 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/sumup-oss/circuit-ui/pull/2679/graphs/tree.svg?width=650&height=150&src=pr&token=xqWZUwlDHL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sumup-oss)](https://app.codecov.io/gh/sumup-oss/circuit-ui/pull/2679?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sumup-oss) ```diff @@ Coverage Diff @@ ## main #2679 +/- ## ======================================= Coverage 86.59% 86.59% ======================================= Files 209 209 Lines 11883 11885 +2 Branches 1499 1500 +1 ======================================= + Hits 10290 10292 +2 Misses 1540 1540 Partials 53 53 ``` | [Files with missing lines](https://app.codecov.io/gh/sumup-oss/circuit-ui/pull/2679?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sumup-oss) | Coverage Δ | | |---|---|---| | [packages/circuit-ui/components/Toggle/Toggle.tsx](https://app.codecov.io/gh/sumup-oss/circuit-ui/pull/2679?src=pr&el=tree&filepath=packages%2Fcircuit-ui%2Fcomponents%2FToggle%2FToggle.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sumup-oss#diff-cGFja2FnZXMvY2lyY3VpdC11aS9jb21wb25lbnRzL1RvZ2dsZS9Ub2dnbGUudHN4) | `78.88% <40.00%> (+0.47%)` | :arrow_up: |