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

feat: new component SelectableCardOptionGroup #4798

Merged
merged 33 commits into from
Mar 4, 2025

Conversation

matthprost
Copy link
Collaborator

@matthprost matthprost commented Feb 21, 2025

Summary

Type

  • Feature

New component SelectableCardOptionGroup

  • <Popup />: fix when there is no animation to not add a setTimeout to close the popup. This will improve the behavior of <SelectInputV2 /> and make the testing less random.
  • <SelectableCard />: remove pointer events on the radio. We were already doing it with the checkbox version. Also improved tabulation to be more accessible.
  • <Label />: improve component to accept as prop that can take either label or legend. It also accept sentiment and disabled props now. The mouse pointer will be a pointer as well when htmlFor is passed.
  • <SelectInputV2 />: improve the focusable elements and fix a visual bug to double click to open the dropdown. Also when there is no space in the input the text will be ellipsis.
  • New component <SelectableCardOptionGroup />
  • New component <SelectableCardOptionGroupField />

Relevant logs and/or screenshots

Screen Recording 2025-02-25 at 18 29 49

Copy link

changeset-bot bot commented Feb 21, 2025

🦋 Changeset detected

Latest commit: ec628b1

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

This PR includes changesets to release 4 packages
Name Type
@ultraviolet/icons Patch
@ultraviolet/plus Patch
@ultraviolet/ui Minor
@ultraviolet/form Minor

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

@matthprost matthprost self-assigned this Feb 26, 2025
@matthprost matthprost added enhancement New feature or request refactor Refactor without breaking changes labels Feb 26, 2025
@matthprost matthprost marked this pull request as ready for review February 26, 2025 14:04
@matthprost matthprost requested review from johnrazeur, a team and lisalupi as code owners February 26, 2025 14:04
@matthprost matthprost force-pushed the feat/new-component-input branch from 8cfdab5 to 5ebd409 Compare February 26, 2025 14:06
@matthprost matthprost requested a review from mhervouet February 26, 2025 14:17
@matthprost matthprost force-pushed the feat/new-component-input branch from 5ebd409 to 3b9f363 Compare February 26, 2025 14:20
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

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

Project coverage is 89.26%. Comparing base (c231fb2) to head (ec628b1).
Report is 39 commits behind head on main.

Files with missing lines Patch % Lines
...omponents/SelectableCardOptionGroupField/index.tsx 64.70% 6 Missing ⚠️
...c/components/SelectableCardOptionGroup/Provider.ts 62.50% 3 Missing ⚠️
packages/ui/src/components/Radio/index.tsx 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4798      +/-   ##
==========================================
+ Coverage   89.19%   89.26%   +0.06%     
==========================================
  Files         230      235       +5     
  Lines        8009     8120     +111     
  Branches     3680     3684       +4     
==========================================
+ Hits         7144     7248     +104     
- Misses        865      872       +7     
Files with missing lines Coverage Δ
packages/ui/src/components/Label/index.tsx 100.00% <100.00%> (ø)
packages/ui/src/components/Notification/index.tsx 100.00% <100.00%> (ø)
packages/ui/src/components/Popup/index.tsx 89.04% <100.00%> (+0.49%) ⬆️
...kages/ui/src/components/SelectInputV2/Dropdown.tsx 41.58% <100.00%> (+0.19%) ⬆️
...ages/ui/src/components/SelectInputV2/SelectBar.tsx 64.28% <100.00%> (+0.71%) ⬆️
packages/ui/src/components/SelectInputV2/index.tsx 81.57% <100.00%> (ø)
...ackages/ui/src/components/SelectableCard/index.tsx 92.15% <100.00%> (+0.15%) ⬆️
...nts/SelectableCardOptionGroup/components/Image.tsx 100.00% <100.00%> (ø)
...ts/SelectableCardOptionGroup/components/Option.tsx 100.00% <100.00%> (ø)
...src/components/SelectableCardOptionGroup/index.tsx 100.00% <100.00%> (ø)
... and 5 more

... and 11 files with indirect coverage changes


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 f1902a6...ec628b1. Read the comment docs.

@matthprost matthprost changed the title feat: new component for options feat: new component SelectableCardOptionGroup Feb 26, 2025
renovate bot and others added 6 commits February 26, 2025 16:11
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…4806)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
renovate bot added 2 commits February 27, 2025 10:27
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added 5 commits February 27, 2025 10:47
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
matthprost and others added 19 commits February 27, 2025 15:10
* docs: fix code editor in storybook

* fix: failing test
….2.7 (#4769)

* chore(devdeps): update dependency @scaleway/eslint-config-react to v5.2.7

* fix: remove duplicate type

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matthias <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix(deps): update dependency react-toastify to v11

* chore: add changeset renovate-8950968

* fix: new version of react toastify

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Scaleway Bot <[email protected]>
Co-authored-by: Matthias Prost <[email protected]>
* fix(deps): update code editor to v4.23.8

* chore: add changeset renovate-28121ac

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Scaleway Bot <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* fix(deps): update dependency react-select to v5.10.0

* chore: add changeset renovate-e0b54b9

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Scaleway Bot <[email protected]>
Co-authored-by: Matthias Prost <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@mhervouet
Copy link

Capture d’écran 2025-03-04 à 14 17 21 Should the label in disabled state use disabled text ?

@matthprost
Copy link
Collaborator Author

Capture d’écran 2025-03-04 à 14 17 21 Should the label in disabled state use disabled text ?

It's fixed !

Screenshot 2025-03-04 at 16 51 31

@matthprost matthprost merged commit 63f9b91 into main Mar 4, 2025
16 checks passed
@matthprost matthprost deleted the feat/new-component-input branch March 4, 2025 16:03
@scaleway-bot scaleway-bot mentioned this pull request Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Refactor without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants