-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
UI: A11y consolidation branch - for CI - do not merge #32458
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
base: next
Are you sure you want to change the base?
Changes from 250 commits
fc66fee
f0b8163
2be76ab
b25ac9a
d8c902a
184b53f
c706e04
d291255
8d3771d
5daae1d
fc7c5e9
2cd7297
10bc115
66b0a4c
6a180f5
214a0e3
fa3371d
db3d3cf
9c8103e
9c28803
287e6bc
3942b0b
999aa03
a2250f1
9884d89
8a03d0e
0ec3fff
87d7840
6a65ac4
f5bef34
d0cd8ea
8ccdee4
dffb64b
e211d30
c937061
0ee8e37
513836f
ee5b077
ae59770
2be7636
7366f80
5a26d93
6b427b6
d9c9808
6c13f3d
0f3a100
17f481c
1b6324a
1e22413
edc0177
f31a74c
49c8fb7
44fee0f
0a2153f
94e3877
1af6051
e7922ef
7bcdc69
69264e3
fdfcef5
d599fa3
aec588a
2dacde4
528848b
1f1b8ba
f1551fe
669680c
ed68f59
626956b
f0bdb40
8fdeb1a
772437a
1ba5f24
488d8bc
cf97e2c
7159dd5
2828dec
af718e9
a7988fd
e914108
b981972
496cf94
eb48f64
7839dfe
5d4731d
c9654d3
75f341b
9040e66
8a317f8
9533eaa
520696b
e59df9a
03462c7
a782802
1b78010
a772005
0cd0ed1
9612f30
a64ff23
29a0031
63b4569
c83ea00
3513f00
c381322
b9b348f
4b3595c
395f5de
7bde9ac
e9dccb1
aba6245
f25b4e3
9d13ec6
b7ee102
869486c
893041a
e9901ed
04a63b8
15be6b9
85a2462
f33df3c
ebe087d
9ff4da1
46bf947
f0ce3fe
a1da280
0a995fa
fefa45e
3b7f654
8a83592
407a388
a25c124
5c42937
2f19c9d
68fc759
0ef2a79
cd1be14
5c2e33f
c9d17d7
f863ac3
8f5911d
2416086
6a41bf0
f0b7aad
b5a1813
dea672e
ff83d3d
a5edb79
bc54bb1
3f1f0b0
badcfc9
25c6d70
41b0ff0
d7d1909
9d316ee
210036e
a054303
e043fa8
99f33b2
d4787ca
003012e
c17e0ce
6d28374
2e03469
5e1c061
6615e45
c0914ec
7f7d51f
0dd561e
02995a7
95e41e2
f8ce0f4
1c283ed
bc9177c
9b149de
6e49865
08f3c7f
34a2c99
0a5e02c
fdf063b
60f0bef
91017dc
7673c76
5ef0ff8
e71e871
bac1fc7
afe4889
f71856f
4d14ff3
0c7723f
68140f7
e873a2f
3fb4e61
cddea31
83016bc
6b9ff97
d67696d
87b8b51
3a74ce5
66deba7
ba01426
b4aa9ad
da097bf
40a4fe0
993e5ac
7de4606
a80c447
9dcda7b
08e87d5
fd7b39e
90f8bd8
b6e340a
b92c3d2
b7f1635
583c037
e2edf21
5a6569e
33f4e0d
5bff322
fff6a0f
1c053c0
930176c
7ac3a30
a00e415
94ecbea
7c1eb65
1d2be9b
02861e6
4266f41
267e962
4bd86e2
c0a5180
5b1b470
4f1938b
f20e2c5
1024415
c1fe255
0dfd1a4
e83f676
77fcd59
8a65204
f1254b9
7eb1e42
986af27
f0c873a
fad0c6d
8ca006e
ebd17ee
a1c4bf5
77f026e
df215d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -8,6 +8,44 @@ | |||||||||||||||||||||||||||||
- [Require `tsconfig.json` `moduleResolution` set to value that supports `types` condition](#require-tsconfigjson-moduleresolution-set-to-value-that-supports-types-condition) | ||||||||||||||||||||||||||||||
- [`core.builder` configuration must be a fully resolved path](#corebuilder-configuration-must-be-a-fully-resolved-path) | ||||||||||||||||||||||||||||||
- [Removed x-only builtin tags](#removed-x-only-builtin-tags) | ||||||||||||||||||||||||||||||
- [API and Component Changes](#api-and-component-changes) | ||||||||||||||||||||||||||||||
- [Button Component API Changes](#button-component-api-changes) | ||||||||||||||||||||||||||||||
- [Added: ariaLabel](#added-arialabel) | ||||||||||||||||||||||||||||||
- [Added: shortcut](#added-shortcut) | ||||||||||||||||||||||||||||||
- [Added: tooltip](#added-tooltip) | ||||||||||||||||||||||||||||||
- [Removed: active](#removed-active) | ||||||||||||||||||||||||||||||
- [IconButton is deprecated](#iconbutton-is-deprecated) | ||||||||||||||||||||||||||||||
- [Bar Component API Changes](#bar-component-api-changes) | ||||||||||||||||||||||||||||||
- [Added: innerStyle](#added-innerstyle) | ||||||||||||||||||||||||||||||
- [FlexBar is deprecated](#flexbar-is-deprecated) | ||||||||||||||||||||||||||||||
- [Tabs is deprecated](#tabs-is-deprecated) | ||||||||||||||||||||||||||||||
- [TabsState is deprecated](#tabsstate-is-deprecated) | ||||||||||||||||||||||||||||||
- [TabWrapper is deprecated](#tabwrapper-is-deprecated) | ||||||||||||||||||||||||||||||
- [TabButton is deprecated](#tabbutton-is-deprecated) | ||||||||||||||||||||||||||||||
- [TabBar is removed](#tabbar-is-removed) | ||||||||||||||||||||||||||||||
- [Modal Component API Changes](#modal-component-api-changes) | ||||||||||||||||||||||||||||||
- [Removed: container and portalSelector](#removed-container-and-portalselector) | ||||||||||||||||||||||||||||||
- [Removed: onInteractOutside](#removed-oninteractoutside) | ||||||||||||||||||||||||||||||
- [Removed: onEscapeKeyDown](#removed-onescapekeydown) | ||||||||||||||||||||||||||||||
- [Added: `ariaLabel`](#added-arialabel-1) | ||||||||||||||||||||||||||||||
- [Renamed: Modal.Dialog.Close and Modal.CloseButton](#renamed-modaldialogclose-and-modalclosebutton) | ||||||||||||||||||||||||||||||
- [ListItem, TooltipLinkList and TooltipMessage are deprecated](#listitem-tooltiplinklist-and-tooltipmessage-are-deprecated) | ||||||||||||||||||||||||||||||
- [Tooltip Component API Changes](#tooltip-component-api-changes) | ||||||||||||||||||||||||||||||
- [Renamed: tooltipRef](#renamed-tooltipref) | ||||||||||||||||||||||||||||||
- [Removed: arrowProps and withArrows](#removed-arrowprops-and-witharrows) | ||||||||||||||||||||||||||||||
- [Removed: placement](#removed-placement) | ||||||||||||||||||||||||||||||
- [Changed type: color](#changed-type-color) | ||||||||||||||||||||||||||||||
- [WithPopover Component Added](#withpopover-component-added) | ||||||||||||||||||||||||||||||
- [WithTooltip Component API Changes](#withtooltip-component-api-changes) | ||||||||||||||||||||||||||||||
- [Removed: trigger](#removed-trigger) | ||||||||||||||||||||||||||||||
- [Added: triggerOnFocusOnly](#added-triggeronfocusonly) | ||||||||||||||||||||||||||||||
- [Renamed: startOpen](#renamed-startopen) | ||||||||||||||||||||||||||||||
- [Removed: svg, strategy, withArrows, mutationObserverOptions](#removed-svg-strategy-witharrows-mutationobserveroptions) | ||||||||||||||||||||||||||||||
- [Removed: hasChrome](#removed-haschrome) | ||||||||||||||||||||||||||||||
- [Removed: closeOnTriggerHidden, followCursor, closeOnOutsideClick](#removed-closeontriggerhidden-followcursor-closeonoutsideclick) | ||||||||||||||||||||||||||||||
- [Removed: interactive](#removed-interactive) | ||||||||||||||||||||||||||||||
- [Other changes](#other-changes) | ||||||||||||||||||||||||||||||
- [WithTooltipPure and WithTooltipState are removed](#withtooltippure-and-withtooltipstate-are-removed) | ||||||||||||||||||||||||||||||
- [From version 8.x to 9.0.0](#from-version-8x-to-900) | ||||||||||||||||||||||||||||||
- [Core Changes and Removals](#core-changes-and-removals) | ||||||||||||||||||||||||||||||
- [Dropped support for legacy packages](#dropped-support-for-legacy-packages) | ||||||||||||||||||||||||||||||
|
@@ -26,8 +64,8 @@ | |||||||||||||||||||||||||||||
- [Viewport/Backgrounds Addon synchronized configuration and `globals` usage](#viewportbackgrounds-addon-synchronized-configuration-and-globals-usage) | ||||||||||||||||||||||||||||||
- [Storysource Addon removed](#storysource-addon-removed) | ||||||||||||||||||||||||||||||
- [Mdx-gfm Addon removed](#mdx-gfm-addon-removed) | ||||||||||||||||||||||||||||||
- [API and Component Changes](#api-and-component-changes) | ||||||||||||||||||||||||||||||
- [Button Component API Changes](#button-component-api-changes) | ||||||||||||||||||||||||||||||
- [API and Component Changes](#api-and-component-changes-1) | ||||||||||||||||||||||||||||||
- [Button Component API Changes](#button-component-api-changes-1) | ||||||||||||||||||||||||||||||
- [Icon System Updates](#icon-system-updates) | ||||||||||||||||||||||||||||||
- [Sidebar Component Changes](#sidebar-component-changes) | ||||||||||||||||||||||||||||||
- [Story Store API Changes](#story-store-api-changes) | ||||||||||||||||||||||||||||||
|
@@ -485,6 +523,7 @@ | |||||||||||||||||||||||||||||
- [Packages renaming](#packages-renaming) | ||||||||||||||||||||||||||||||
- [Deprecated embedded addons](#deprecated-embedded-addons) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
## From version 9.x to 10.0.0 | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
### Core Changes | ||||||||||||||||||||||||||||||
|
@@ -585,6 +624,159 @@ export const core = { | |||||||||||||||||||||||||||||
During development of Storybook [Tags](https://storybook.js.org/docs/writing-stories/tags), we created `dev-only`, `docs-only`, and `test-only` built-in tags. These tags were never documented and superseded by the currently-documented `dev`, `autodocs`, and `test` tags which provide more precise control. The outdated `x-only` tags are removed in 10.0. | ||||||||||||||||||||||||||||||
During development of Storybook [Tags](https://storybook.js.org/docs/writing-stories/tags), we created `dev-only`, `docs-only`, and `test-only` built-in tags. These tags were never documented and superceded by the currently-documented `dev`, `autodocs`, and `test` tags which provide more precise control. The outdated `x-only` tags are removed in 10.0. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
### API and Component Changes | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Button Component API Changes | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Added: ariaLabel | ||||||||||||||||||||||||||||||
The Button component now has a mandatory `ariaLabel` prop, to ensure that Storybook UI code is accessible to screenreader users. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
When buttons have text content as children, and when that text content does not rely on visual context to be understood, you may pass `false` to the `ariaLabel` prop to indicate that an ARIA label is not necessary. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
In every other case (your Button only contains an icon, has a responsive layout that can hide its text, or relies on visual context to make sense), you must pass a label to `ariaLabel`, which screenreaders will read. The label should be short and start with an action verb. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Added: shortcut | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
An optional `shortcut` prop was added for internal use. When `shortcut` is set, the Button will be appended with a human-readable string for the shortcut, and the `aria-keyshortcuts` prop will be set. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Added: tooltip | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Button now displays a tooltip whenever `ariaLabel` or `shortcut` is set. The tooltip can be customised by passing a string to the optional `tooltip` prop. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Removed: active | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The `active` prop was removed from Button. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The Button component has historically been used to implement Toggle and Select interactions. When you need a Button to have an active state, use ToggleButton if the active state denotes that a state or feature is enabled after pressing the Button. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Use Select if the active state denotes that the Button is open while a selection is being made, or that the Button currently has a selected value. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### IconButton is deprecated | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The IconButton component is deprecated, as it overlaps with Button. Instead, use Button with the `'ghost'` variant and `'small'` padding, and add an `ariaLabel` prop for screenreaders to announce. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
IconButton will be removed in future versions. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Bar Component API Changes | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The `Bar` component's internal layout has changed. It now applies flex positioning and applies a default item gap, that can be controlled with the `innerStyle` prop. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Added: innerStyle | ||||||||||||||||||||||||||||||
When `scrollable` is set to `true`, `Bar` now adds an inner container that is used to ensure the scrollbar size does not impact the height of the bar. This inner container displays as 'flex' and has the following default style: | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
```css | ||||||||||||||||||||||||||||||
width: 100%; | ||||||||||||||||||||||||||||||
min-height: 40; | ||||||||||||||||||||||||||||||
display: flex; | ||||||||||||||||||||||||||||||
align-items: center; | ||||||||||||||||||||||||||||||
gap: 6px; | ||||||||||||||||||||||||||||||
padding-inline: 6px; | ||||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||||
Comment on lines
+667
to
+674
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix invalid CSS unit in example (min-height).
width: 100%;
- min-height: 40;
+ min-height: 40px;
display: flex;
align-items: center;
gap: 6px;
padding-inline: 6px; 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The inner container's style can be overridden by passing CSS properties to `innerStyle`. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### FlexBar is deprecated | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The `FlexBar` component is deprecated. Instead, use the `Bar` component and apply `justifyContent: 'space-between'` through the `innerStyle` prop. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Tabs is deprecated | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The `Tabs` component is deprecated as it was not accessible. Instead, use the new `TabsView` component or `TabList` and `TabPanel` with the `useTabsState` hook. Note that `TabsView` does not support mixing HTML links and tabs. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### TabsState is deprecated | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The `TabsState` class is deprecated as it was not accessible. Instead, use the new `TabsView` component or `TabList` and `TabPanel` with the `useTabsState` hook. Note that `TabsView` does not support mixing HTML links and tabs. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### TabWrapper is deprecated | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The `TabWrapper` component is deprecated as it was not accessible. Instead, use the new `TabsView` component or `TabList` and `TabPanel` with the `useTabsState` hook. Note that `TabsView` does not support mixing HTML links and tabs. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### TabButton is deprecated | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The `TabButton` class is deprecated as it was not accessible. It does not have a replacement, as the new `TabList` component handles tab buttons internally. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### TabBar is removed | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The `TabBar` component, a styled bar used inside `Tabs` and not intended to be public, has been removed. It has no replacement. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Modal Component API Changes | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Removed: container and portalSelector | ||||||||||||||||||||||||||||||
The `container` and `portalSelector` props were not used inside Storybook, so they have been removed. The new Modal component does not support custom portal locations, because it is not recommended practice. A single portal at the end of the document ensures modals appear in their order of creation and are never cropped by CSS `overflow` properties. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Removed: onInteractOutside | ||||||||||||||||||||||||||||||
The `onInteractOutside` prop is removed in favor of `dismissOnClickOutside`, because it was only used to close the modal when clicking outside. Use `dismissOnClickOutside` to control whether clicking outside the modal should close it or not. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Removed: onEscapeKeyDown | ||||||||||||||||||||||||||||||
The `onEscapeKeyDown` prop is removed in favor of `dismissOnEscape`, because it was only used to close the modal when pressing Escape. Use `dismissOnEscape` to control whether pressing Escape should close it or not. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Added: `ariaLabel` | ||||||||||||||||||||||||||||||
Modal elements must have a title to be accessible. Set that title through the mandatory `ariaLabel` prop. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Renamed: Modal.Dialog.Close and Modal.CloseButton | ||||||||||||||||||||||||||||||
The `Modal.Dialog.Close` component and `Modal.CloseButton` components are replaced by `Modal.Close` for consistency with other components. Those names are deprecated and will be removed in a future version. You may call `<Modal.Close />` for a default close button, or `<Modal.Close asChild>...</Modal.Close>` to wrap your own custom button. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The `Modal.Close` component no longer requires an `onClick` handler to close the modal. It will automatically close the modal when clicked. If you need to perform additional actions when the close button is clicked, you can still provide an `onClick` handler, and it will be called in addition to closing the modal. | ||||||||||||||||||||||||||||||
#### ListItem, TooltipLinkList and TooltipMessage are deprecated | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The ListItem and TooltipLinkList components were used in Storybook to make menus, and TooltipMessage to make message popovers. However, WithTooltip does not support keyboard interactions, so these components were not accessible. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
These components are now deprecated and will be removed in future versions. To replace TooltipMessage, replace WithTooltip with WithPopover, and use Popover as a base component for your popovers. To replace ListItem and TooltipLinkList, a dedicated menu component will be introduced in a future version, and Popover can be used in the meantime. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Tooltip Component API Changes | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Renamed: tooltipRef | ||||||||||||||||||||||||||||||
Tooltip's `ref` prop is now named `ref` for consistency. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Removed: arrowProps and withArrows | ||||||||||||||||||||||||||||||
Comment on lines
+728
to
+731
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarify rename: it’s Apply this diff: - ##### Renamed: tooltipRef
- Tooltip's `ref` prop is now named `ref` for consistency.
+ ##### Renamed: tooltipRef
+ Tooltip's `tooltipRef` prop is now named `ref` for consistency. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||
The `arrowProps` and `withArrows` props were not used in Storybook, so they have been removed. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
We recommend you do not use arrows in your addon tooltips for better consistency with the Storybook UI. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Removed: placement | ||||||||||||||||||||||||||||||
The `placement` prop was passed to help position the arrow. It has also been removed. WithToolip now entirely handles the placement of its tooltip on its own. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Changed type: color | ||||||||||||||||||||||||||||||
Comment on lines
+737
to
+739
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo: “WithToolip” → “WithTooltip”. Also tweak the sentence for clarity. Apply this diff: - The `placement` prop was passed to help position the arrow. It has also been removed. WithToolip now entirely handles the placement of its tooltip on its own.
+ The `placement` prop was passed to help position the arrow. It has also been removed. WithTooltip now entirely handles the placement of its tooltip. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||
The `color` prop used to accept arbitrary colors and theme background color names. This made it difficult to use. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The prop was to the background color of the tooltip, and it was not possible to set the text color in a consistent fashion. To ensure Tooltip uses accessible colors, the prop has been limited to the following values: `'default'`, `'inverse'`, `'positive'`, `'negative'`, `'warning'` and `'none'`. The prop now controls both background and foreground colors. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### WithPopover Component Added | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
The WithPopover component acts as a counterpoint to WithTooltip. When you want an interactive overlay with buttons or inputs, use WithPopover and Popover. When you want a static overlay that shows on focus or hover, use WithTooltip with TooltipNote or Tooltip. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
WithPopover is based on react-aria. It must have a single child that acts as a trigger. This child must have a pressable role (can be clicked or pressed) and must be able to receive React refs. Wrap your trigger component in `forwardRef` if you notice placement issues for your popover. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### WithTooltip Component API Changes | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
##### Removed: trigger | ||||||||||||||||||||||||||||||
The `trigger` prop was removed to enforce better accessibility compliance. WithTooltip must not be triggered on click, as it is not reachable by keyboard. Buttons that open a popover, menu or select must use appropriate components instead. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Added: triggerOnFocusOnly | ||||||||||||||||||||||||||||||
The `triggerOnFocusOnly` prop was added. When set, tooltips will only show on focus. Use this to provide keyboard navigation hints to keyboard users. Do not use it for other purposes. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Renamed: startOpen | ||||||||||||||||||||||||||||||
The `startOpen` prop was renamed `defaultVisible` to match naming in other components that expose both controlled and uncontrolled visibility. The `startOpen` prop will be removed in future versions. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Removed: svg, strategy, withArrows, mutationObserverOptions | ||||||||||||||||||||||||||||||
These prop were not used inside Storybook and have been removed. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Removed: hasChrome | ||||||||||||||||||||||||||||||
The `hasChrome` prop was removed because it should be handled by the tooltip being shown instead. Popover and Tooltip both have a `hasChrome` prop. TooltipNote never needs this prop and does not have it. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Removed: closeOnTriggerHidden, followCursor, closeOnOutsideClick | ||||||||||||||||||||||||||||||
The `closeOnTriggerHidden`, `followCursor` and `closeOnOutsideClick` prop has been removed. WithTooltip will now authoritatively decide when and where to show or hide its tooltip. It will always close on clicks outside the tooltip, because tooltips should never be modal. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Removed: interactive | ||||||||||||||||||||||||||||||
Thed `interactive` prop has been removed as it does not align with our vision for accessible components with a well-defined role. Use WithPopover instead of WithTooltip to show interactive overlays. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Comment on lines
+771
to
+772
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo: “Thed” → “The”. Apply this diff: - Thed `interactive` prop has been removed as it does not align with our vision for accessible components with a well-defined role. Use WithPopover instead of WithTooltip to show interactive overlays.
+ The `interactive` prop has been removed as it does not align with our vision for accessible components with a well-defined role. Use WithPopover instead of WithTooltip to show interactive overlays. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||
##### Other changes | ||||||||||||||||||||||||||||||
The underlying implementation was switched from Popper.js to react-aria. Due to these changes, WithTooltip must now have a single child that has a focusable role and that can receive React refs. Wrap your trigger component in `forwardRef` if you notice placement issues for your tooltip. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### WithTooltipPure and WithTooltipState are removed | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Instead, use WithTooltip. For a controlled tooltip, use the `onVisibleChange` and `visible` props. For an uncontrolled tooltip with a default open state, use the `defaultVisible` prop. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
## From version 8.x to 9.0.0 | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
### Core Changes and Removals | ||||||||||||||||||||||||||||||
|
@@ -1217,7 +1409,7 @@ Key changes: | |||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
#### Angular: Introduce `features.angularFilterNonInputControls` | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Storybook has added a new feature flag `angularFilterNonInputControls` which filters out non-input controls from Angular compoennts in Storybook's controls panel. | ||||||||||||||||||||||||||||||
Storybook has added a new feature flag `angularFilterNonInputControls` which filters out non-input controls from Angular components in Storybook's controls panel. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
To enable it, just set the feature flag in your `.storybook/main.<js|ts> file. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
Comment on lines
+1412
to
1415
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix inline code formatting for path placeholder. Missing closing backtick around the file glob placeholder. Apply this diff: -To enable it, just set the feature flag in your `.storybook/main.<js|ts> file.
+To enable it, just set the feature flag in your `.storybook/main.<js|ts>` file. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||||||||||
|
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.
Remove duplicated paragraph and fix spelling (“superseded”).
Two consecutive sentences say the same thing; the second also misspells “superseded”. Drop the duplicate.
During development of Storybook [Tags](https://storybook.js.org/docs/writing-stories/tags), we created `dev-only`, `docs-only`, and `test-only` built-in tags. These tags were never documented and superseded by the currently-documented `dev`, `autodocs`, and `test` tags which provide more precise control. The outdated `x-only` tags are removed in 10.0. -During development of Storybook [Tags](https://storybook.js.org/docs/writing-stories/tags), we created `dev-only`, `docs-only`, and `test-only` built-in tags. These tags were never documented and superceded by the currently-documented `dev`, `autodocs`, and `test` tags which provide more precise control. The outdated `x-only` tags are removed in 10.0.
📝 Committable suggestion
🤖 Prompt for AI Agents