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
[NO-TICKET] Upgrade React types to fix Storybook 8 branch #3080
base: WNMGDS-2698/upgrade-storybook
Are you sure you want to change the base?
[NO-TICKET] Upgrade React types to fix Storybook 8 branch #3080
Conversation
Here's the summary of errors we're starting with: ``` Found 109 errors in 28 files. Errors Files 4 packages/design-system/src/components/Accordion/Accordion.stories.tsx:8 3 packages/design-system/src/components/Alert/Alert.stories.tsx:6 1 packages/design-system/src/components/Autocomplete/utils.tsx:15 11 packages/design-system/src/components/ChoiceList/ChoiceList.stories.tsx:7 4 packages/design-system/src/components/Drawer/Drawer.stories.tsx:29 12 packages/design-system/src/components/Dropdown/Dropdown.stories.tsx:8 6 packages/design-system/src/components/Dropdown/Dropdown.tsx:171 1 packages/design-system/src/components/Dropdown/DropdownMenuOption.tsx:66 5 packages/design-system/src/components/HelpDrawer/HelpDrawer.stories.tsx:29 4 packages/design-system/src/components/IdleTimeout/IdleTimeout.stories.tsx:10 4 packages/design-system/src/components/PrivacySettingsDialog/PrivacySettingsDialog.stories.tsx:17 6 packages/design-system/src/components/Spinner/Spinner.stories.tsx:6 23 packages/design-system/src/components/TextField/TextField.stories.tsx:10 2 packages/design-system/src/components/Tooltip/Tooltip.tsx:357 1 packages/design-system/src/components/UsaBanner/UsaBanner.stories.tsx:5 1 packages/design-system/src/components/web-components/ds-accordion/ds-accordion.tsx:22 1 packages/design-system/src/components/web-components/preactement/define.test.tsx:35 1 packages/docs/src/components/content/ContentRenderer.tsx:111 1 packages/docs/src/components/content/EmbeddedExample.tsx:17 2 packages/docs/src/components/layout/SideNav/SideNav.tsx:25 2 packages/docs/src/components/layout/TableOfContents.tsx:43 1 packages/docs/src/components/page-templates/BlogPage.tsx:18 1 packages/docs/src/pages/blog.tsx:33 2 packages/ds-healthcare-gov/src/components/Accordion/Accordion.stories.tsx:8 2 packages/ds-medicare-gov/src/components/Card/Card.stories.tsx:6 5 packages/ds-medicare-gov/src/components/HelpDrawer/HelpDrawer.stories.tsx:31 1 packages/ds-medicare-gov/src/components/SimpleFooter/SimpleFooter.stories.tsx:6 2 packages/ds-medicare-gov/src/components/Stars/stars.stories.tsx:6 ```
Add new interaction VRTs for dialog and drawer, and don't have any of the stories open them automatically
I was hoping fixing these types would do it.
…file I think I'll go back and undo some of my previous commits to see if I need them
This reverts commit f4fac88.
This reverts part of commit ffc035d.
It seems as though the type inference has gotten worse in this version. Instead of the type for Badge `size` being listed as `big` (only supports big), it is now reported as `literal`. For `string | React.ReactNode`, it only says `union`. Instead of `type` being `checkbox` and `radio`, it’s `union`. Instead of `ReactNode` for `React.ReactNode`, it prints out as `ReactReactNode`
Status update: 6811f4b shows that there were some significant regressions in Storybook's ability to infer TypeScript types and document them. Instead of the type for Badge I also did some investigating into the yarn lockfile changes, and I made sure that all the "docgen"-related packages were either going up in version number or staying the same, just to rule out the possibility that we might literally be going backwards. |
This reverts commit 6811f4b.
… much fewer changes See storybookjs/storybook#26496
Summary
@types/react
and@types/react-dom
as close as possible and made sure it was consistent everywhereyarn.lock
file manually to get rid of old entriesHow to test
yarn type-check
yarn storybook
Checklist
Planning to merge it into the other branch, and I think we'll want to put that branch into v11