Skip to content

feat(storybook): upgrade to version 10.1.4#767

Merged
KetanReddy merged 5 commits intoplayer-ui:mainfrom
dtychshenko:fix/upgrade-storybook
Dec 21, 2025
Merged

feat(storybook): upgrade to version 10.1.4#767
KetanReddy merged 5 commits intoplayer-ui:mainfrom
dtychshenko:fix/upgrade-storybook

Conversation

@dtychshenko
Copy link
Copy Markdown
Contributor

  • Upgraded Storybook from version 7.6.10 to latest 10.1.4. See migration guide
    • Updated package versions and dependencies
    • Fixed imports, stories and addons to address breaking Storybook version changes
    • Replaced deprecated components and packages
  • Fixed broken images within stories
  • Fixed initial value for dark mode hook used by the code editors

Closes #744

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major
  • N/A

Does your PR have any documentation updates?

  • Updated docs
  • No Update needed
  • Unable to update docs

Demo

Screen.Recording.2025-12-06.at.5.30.00.PM.Small.mp4

Release Notes

Upgraded Storybook from version 7.6.10 to latest 10.1.4. Also fixed broken images within stories and initial value for dark mode for the editors.

- Upgraded Storybook from version 7.6.10 to latest 10.1.4
  - Updated package versions and dependencies
  - Fixed imports, stories and addons to address breaking Storybook version changes
  - Replaced deprecated components and packages
- Fix broken images within stories
- Fixed initial value for dark mode hook
@dtychshenko dtychshenko requested review from a team as code owners December 6, 2025 22:49
@KetanReddy
Copy link
Copy Markdown
Member

Hey @dtychshenko, thanks for the PR! Most of the stories seem to work but the Transition to End story under the Action section seems to throw a react error when loaded.

image

Comment thread package.json Outdated
Comment on lines +11 to +12
"node": ">=20.19.0",
"pnpm": ">=10.18.1"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason to change the this logic?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Storybook requires Node 20.19+ or 22.12+ or 24+. https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#nodejs-2019-or-2212-required

Although I haven't tested every version, the previous range was no longer valid and I figured >= 20.19.0 should be good enough, but I can be more specific and match what storybook requires: ^20.19.0 || ^22.12.0 || >=24 Would you prefer this instead? And I can revert the pnpm range in case future major versions aren't compatible.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha gotcha. I think on the node side we should be fine. I'll make an issue for this but we should probably update everything to node 22.x as 20.x is going to be EOL in a couple months.

I don't have a ton of concern on the node side as things are generally stable there but that should be aligned with the node version we're using here just to make sure there are no inconsistencies between Bazel and non-Bazel invocations. pnpm I am slightly worried about majors having breaking changes, specifically in the lockfile format which may cause issues with how Bazel resolves dependencies.

Can do we do something like

"node": "20.19.6",
"pnpm": "^10.18.1"

and update the MODULE.bazel to use that node version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I didn't realize bazel has its own version configured. I see that's it's set to 22.15.1, which already satisfies the overall project requirements. I've updated the package.json version to match that. This should now satisfy Storybook, overall project requirements and match existing Bazel and Volta settings.

Comment thread package.json
@dtychshenko
Copy link
Copy Markdown
Contributor Author

Hey @dtychshenko, thanks for the PR! Most of the stories seem to work but the Transition to End story under the Action section seems to throw a react error when loaded.

Thanks! This should be fixed now

"type": "image",
"metaData": {
"ref": "https://player-ui.github.io/latest/logo/logo-light-large.png"
"ref": "https://raw.githubusercontent.com/player-ui/player/refs/tags/0.14.1/docs/site/src/assets/logo/logo-light-large.png"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you say a bit about what issue this fixed? I'm wondering if we can keep the original url since it points to latest, rather than a specific tag version. If not, is there a way for all of these changed links to point to main rather than a specific release?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous image at https://player-ui.github.io/latest/logo/logo-light-large.png seems to no longer exist, so currently these are broken images in the storybook:
Screenshot 2025-12-10 at 12 33 58 PM

We can point to the version on the main branch, but as the codebase evolves and moves, there's a good chance that at some point the image could be moved to a different location and all the links to main would be broken again.

Hence, I wanted to point them to the latest tag 0.14. to be a bit more future proof. But the tag, of course, could also be removed or updated in the future (although there's less chance of that), but what I could also do is point it to the latest commit on the main branch, so the likelihood of it being changed is close to 0. It will be something like: https://raw.githubusercontent.com/player-ui/player/1761014/docs/site/src/assets/logo/logo-light-large.png What do you think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, good point. If it's also just the logo image, it should be fine to point to a specific tag.

"type": "image",
"metaData": {
"ref": "https://player-ui.github.io/latest/logo/logo-light-large.png"
"ref": "https://raw.githubusercontent.com/player-ui/player/refs/tags/0.14.1/docs/site/src/assets/logo/logo-light-large.png"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, good point. If it's also just the logo image, it should be fine to point to a specific tag.

Copy link
Copy Markdown
Member

@spentacular spentacular left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mind blown

@KetanReddy KetanReddy added the skip-release Preserve the current version when merged label Dec 14, 2025
@KetanReddy KetanReddy linked an issue Dec 14, 2025 that may be closed by this pull request
@KetanReddy KetanReddy added minor Increment the minor version when merged and removed skip-release Preserve the current version when merged labels Dec 21, 2025
@KetanReddy KetanReddy merged commit d3a1ed7 into player-ui:main Dec 21, 2025
5 of 8 checks passed
@dtychshenko dtychshenko deleted the fix/upgrade-storybook branch December 23, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Increment the minor version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Node to Node 22 Update to Storybook 10

4 participants