-
Notifications
You must be signed in to change notification settings - Fork 0
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(SegmentedControl)!: new Style and add icon #995
Conversation
Storybook for this build: https://ds.equisoft.io/pr-995/ |
Webapp for this build: https://ds.equisoft.io/pr-995/webapp/ |
packages/react/src/components/segmented-control/segmented-control.tsx
Outdated
Show resolved
Hide resolved
packages/react/src/components/segmented-control/segmented-control.tsx
Outdated
Show resolved
Hide resolved
packages/react/src/components/segmented-control/segmented-control.tsx
Outdated
Show resolved
Hide resolved
packages/react/src/components/segmented-control/segmented-control.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quelques commentaires :
- Le border-radius de l'état hover semble être de 8px mais dans Figma il est de 4px
- Dans l'état hover, le padding-left et right devrait être de 4px et identique au padding-top et bottom
- Le letter-spacing du texte lorsqu'une option est pressed semble beaucoup plus prononcé que ce qu'il y a dans Figma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
packages/react/src/components/segmented-control/segmented-control.tsx
Outdated
Show resolved
Hide resolved
|
||
return ( | ||
<Container className={className} role="group" aria-label={groupName}> | ||
{buttonGroup.map((button, i) => ( | ||
<ToggleButton | ||
aria-label={button.label} | ||
aria-label={button.ariaLabel || undefined} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ça devrait pas faire un fallback vers button.label
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dans le cas où il y a seulement une icône, il n'y aura pas de label
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mais dans le cas où il y a un button.label
, mais pas de button.ariaLabel
, est-ce qu'on veut quand même un aria-label
avec button.label
comme valeur? Ou on laisse la techno gérer avec le label qui va être en texte dans le span?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
est-ce qu'on veut quand même un
aria-label
avecbutton.label
comme valeur?
C'était semi comme ça avant mais je ne vois pas ce que ça apporte de plus de passer le label
par l'aria-label
sachant que le texte est déjà présent dans le span
. Pour l'a11y il n'y a pas de gain et ça ajoute des éléments qui ne sont pas nécessaire dans la DOM. Est-ce que tu y vois un avantage?
packages/react/src/themes/tokens/component/segmented-control-tokens.ts
Outdated
Show resolved
Hide resolved
d092316
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
DS-1231