-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
UI: Upgrade Icon component #23680
UI: Upgrade Icon component #23680
Conversation
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.
@cdedreuille thanks for taking on this task and updating the snippets we're using. Appreciate it 🙏 ! The documentation changes look good to me, but I'll defer to the rest of the team to see what they say.
So that everyone is aware, I've already followed up with Charles to not only add some changes to the documentation but also a reminder for the addon kit to be updated to factor in these ones as well to prevent the code & documentation fall out of sync.
@@ -109,7 +109,8 @@ Going through the code blocks in sequence: | |||
```ts | |||
import { useGlobals, useStorybookApi } from '@storybook/manager-api'; | |||
|
|||
import { Icons, IconButton } from '@storybook/components'; | |||
import { IconButton } from '@storybook/components'; | |||
import { Icon } from '@storybook/components/experimental'; |
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.
do we want addon maintainers to do this, given that it's experimental?
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.
Ideally yes. It is experimental mostly because we want to move this at some point to a core package. @ndelangen can talk more about that. But the components inside this package are the real one and should be used.
@@ -144,7 +145,7 @@ export const VisionSimulator = () => { | |||
onDoubleClick={() => setFilter(null)} | |||
> | |||
<IconButton key="filter" active={!!filter} title="Vision simulator"> | |||
<Icons icon="accessibility" /> | |||
<Icon.Accessibility /> |
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.
According to the docs you wrote:
The meaning can be obvious visually, but it must have a proper text alternative via
aria-label
for screen readers
Should you make sure every icon in this PR has the proper aria-label applied to it?
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.
@yannbf That would be great but that would require quite some time to test everything. I would put that effort in a separate PR though with other efforts to improve accessibility.
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.
I found a new way to help accessibility in a semi automated way @yannbf. I'll explore this more in a separate PR.
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!
What I did
We introduced a new library for icons. In this PR I'm replacing all icons by the new library. This PR doesn't include the following:
This PR also fixes:
How to test
yarn task --task sandbox --start-from auto --template react-vite/default-ts
Checklist
MIGRATION.MD
Maintainers
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
["cleanup", "BREAKING CHANGE", "feature request", "bug", "build", "documentation", "maintenance", "dependencies", "other"]
🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/core
team here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>