Skip to content

feat(SwitchButton): refactor component #5222

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

Open
wants to merge 3 commits into
base: beta
Choose a base branch
from

Conversation

lisalupi
Copy link
Collaborator

@lisalupi lisalupi commented Jun 9, 2025

Summary

Type

  • Refactor

Summarise concisely:

What is expected?

Breaking changes
SwitchButton: New version of the component:

  • props leftButton and rightButton removed
  • Use SwitchButton.Option to add buttons/options
  • More than 2 options possible now !
  • New sizes
  • New prop sentiment

@lisalupi lisalupi requested review from mhervouet and a team June 9, 2025 09:05
@lisalupi lisalupi self-assigned this Jun 9, 2025
@lisalupi lisalupi requested review from Lawndlwd and radhi-nasser-scaleway and removed request for a team June 9, 2025 09:05
@lisalupi lisalupi requested a review from johnrazeur as a code owner June 9, 2025 09:05
@lisalupi lisalupi requested review from a team and matthprost as code owners June 9, 2025 09:05
Copy link

changeset-bot bot commented Jun 9, 2025

🦋 Changeset detected

Latest commit: 7af7d02

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

This PR includes changesets to release 3 packages
Name Type
@ultraviolet/ui Minor
@ultraviolet/form Major
@ultraviolet/plus 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

Copy link

codecov bot commented Jun 9, 2025

Codecov Report

Attention: Patch coverage is 92.00000% with 6 lines in your changes missing coverage. Please review.

Please upload report for BASE (beta@2a6a3c3). Learn more about missing BASE report.

Files with missing lines Patch % Lines
packages/ui/src/components/SwitchButton/index.tsx 87.75% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             beta    #5222   +/-   ##
=======================================
  Coverage        ?   89.32%           
=======================================
  Files           ?      202           
  Lines           ?     7781           
  Branches        ?     3586           
=======================================
  Hits            ?     6950           
  Misses          ?      831           
  Partials        ?        0           
Files with missing lines Coverage Δ
...es/ui/src/components/SwitchButton/FocusOverlay.tsx 100.00% <100.00%> (ø)
packages/ui/src/components/SwitchButton/Option.tsx 100.00% <100.00%> (ø)
...src/components/SwitchButton/SwitchButtonContext.ts 100.00% <100.00%> (ø)
packages/ui/src/components/SwitchButton/index.tsx 90.32% <87.75%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a6a3c3...7af7d02. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants