rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
463 stars 261 forks source link

Some Storybook components do not render correctly after migration #11707

Open cnotv opened 3 months ago

cnotv commented 3 months ago

Description

As by title, some components are not displayed correctly, as well as some errors are returned in some pages.

Known issues:

Screenshots

Screenshot 2024-08-26 at 16 55 17 Screenshot 2024-08-26 at 16 54 52

Screenshot 2024-09-23 at 20 10 57

cnotv commented 1 month ago

An upgrade to Storybook 8 with VueCLI/Webpack is not possible due deprecation so we should migrate to Vite asap https://github.com/rancher/dashboard/issues/7468 It is not listed in the template options when creating a new object.

cnotv commented 1 month ago

I tried to move to Storybook8 using Vite, but unfortunately, it reached a point of incompatibility.

Screenshot 2024-10-21 at 16 36 20
cnotv commented 1 month ago

It looks like it's possible to add @storybook/vue3-webpack5 and use that instead of Vite, although it is deprecated, I repeat.

I am currently trying to port one by one the configuration. The examples are working correctly after tweaking around.

cnotv commented 1 month ago

As a final result of my whole research about Storybook 8, it looks like it's not allowed anymore to use just MDX (flavored markdown) to document components. It is now required to first declare it as SFC (Storybook Format Component), then reference it with custom documentation if needed.

cnotv commented 1 week ago

For some reason, the plugins are not added to the configuration with Webpack when added in preview.ts. This has been tested with a clean installation with Vue/vite (only option in CLI) and is rendered.

Installing a new version with @storybook/vue3-webpack5 restricts the issue to the library, returning an issue using documented configuration.