-
Notifications
You must be signed in to change notification settings - Fork 30
docs: Move autocomplete stories to v9 storybook #2888
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: master
Are you sure you want to change the base?
Conversation
Moved and renamed the following files from docs/components/Autocomplete to packages/components/src/Autocomplete: - Web.stories.tsx → Autocomplete.stories.tsx - WebV2.stories.tsx → AutocompleteV2.stories.tsx - V1.docgen.tsx → V1.docgen.tsx (no rename needed) - V2.docgen.tsx → V2.docgen.tsx (no rename needed) These files will be modernized in a subsequent commit.
Updated both Autocomplete.stories.tsx and AutocompleteV2.stories.tsx to use v9 patterns:
1. Updated meta export format:
- Changed from `as ComponentMeta<T>` to `satisfies ComponentMeta<T>`
- Added `type Story = ComponentStory<typeof meta>`
- Removed unnecessary parameters (previewTabs)
- Updated title paths (removed /Web suffix)
2. Updated story definitions:
- Changed from `.bind({})` pattern to object format with `render` property
- Used `Story` type for all exported stories
- Preserved all existing args and functionality
Files modified:
- Autocomplete.stories.tsx (v1 stories)
- AutocompleteV2.stories.tsx (v2 stories)
|
|
||
| [Autocomplete docs](https://atlantis.getjobber.com/components/Autocomplete) have moved to the new site. | ||
|
|
||
| [Web](https://atlantis.getjobber.com/storybook/web/?path=/story/components-forms-and-inputs-autocomplete--basic) stories have moved to Storybook v9. |
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.
Matches what we did for Button.
| @@ -0,0 +1,200 @@ | |||
| --- | |||
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.
| <Autocomplete | ||
| {...args} | ||
| value={value} | ||
| placeholder={args?.placeholder ?? ""} |
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.
TS was complaining about args.placeholder being undefined possibly 🤷♂️

Motivations
We need to migrate stories from v7 to v9 web/mobile storybooks.
This PR migrates Autocomplete stories and also adds a Claude Skill which can be used to do ~90% of the migration.
Before
After
Changes
Changed
Testing
npm run storybookcd packages/components && npm run storybookcd packages/site && npm run devChanges can be
tested via Pre-release
In Atlantis we use Github's built in pull request reviews.