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

chore(button-toggle): remove deprecated props and convert enzyme tests to RTL #6747

Merged
merged 6 commits into from
Jun 11, 2024

Conversation

nuria1110
Copy link
Contributor

Proposed behaviour

  • Remove checked prop from ButtonToggle.
  • Remove name prop from ButtonToggle and ButtonToggleGroup.
  • ButtonToggleGroup onChange prop no longer has name in type.
  • Convert tests to RTL.

Current behaviour

  • ButtonToggle checked prop is deprecated.
  • ButtonToggle and ButtonToggleGroup name prop is deprecated.
  • Tests are in enzyme.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

Removes deprecated `checked` prop from `ButtonToggle`.

BREAKING CHANGE: `checked` prop has been removed, `pressed` should be used instead.
Removes deprecated `name` prop from `ButtonToggle` and `ButtonToggleGroup`, `onChange` type has also
been updated as a result.

BREAKING CHANGE: `name` prop has been removed, `onChange` prop type as also been updated as a
result.
Copy link
Contributor

@Parsium Parsium left a comment

Choose a reason for hiding this comment

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

Just a few comments from me. Great job on this @nuria1110, especially with using more accessible RTL queries wherever possible 👍🏼

Copy link
Contributor

@edleeks87 edleeks87 left a comment

Choose a reason for hiding this comment

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

Nothing to add that @Parsium hasn't already raised, I don't completely agree with the suggested description updates but I think slight tweaks to them is worthwhile

@edleeks87 edleeks87 marked this pull request as ready for review June 3, 2024 11:09
@edleeks87 edleeks87 requested review from a team as code owners June 3, 2024 11:09
@nuria1110 nuria1110 merged commit 993b73b into master Jun 11, 2024
21 checks passed
@nuria1110 nuria1110 deleted the FE-6561-button-toggle-rtl branch June 11, 2024 09:32
@carbonci
Copy link
Collaborator

🎉 This PR is included in version 138.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

5 participants