Skip to content
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

[Bug]: Code block does not react to controls changes for Vue components #23132

Closed
paulgv opened this issue Jun 19, 2023 · 7 comments · Fixed by #23149
Closed

[Bug]: Code block does not react to controls changes for Vue components #23132

paulgv opened this issue Jun 19, 2023 · 7 comments · Fixed by #23149

Comments

@paulgv
Copy link

paulgv commented Jun 19, 2023

Describe the bug

In docs pages, interacting with the default story's controls does not have any effect on the source code block. The story itself does re-render properly to reflect the controls' state. But the code block seems to be stuck on the initial values.

Screenshot 2023-06-19 at 7 24 10 AM

To Reproduce

https://gitlab-org.gitlab.io/gitlab-ui/?path=/docs/base-alert--docs

Expand the default story's code and interact with controls below.

System

Environment Info:

  System:
    OS: macOS 13.4
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 18.16.0 - ~/.asdf/installs/nodejs/18.16.0/bin/node
    Yarn: 1.22.19 - ~/.asdf/shims/yarn
    npm: 9.5.1 - ~/.asdf/plugins/nodejs/shims/npm
  Browsers:
    Chrome: 114.0.5735.133
    Firefox: 114.0.1
    Safari: 16.5
  npmPackages:
    @storybook/addon-a11y: 7.0.20 => 7.0.20
    @storybook/addon-docs: 7.0.20 => 7.0.20
    @storybook/addon-essentials: 7.0.20 => 7.0.20
    @storybook/addon-storyshots: 7.0.20 => 7.0.20
    @storybook/addon-storyshots-puppeteer: 7.0.20 => 7.0.20
    @storybook/addon-viewport: 7.0.20 => 7.0.20
    @storybook/builder-webpack5: 7.0.20 => 7.0.20
    @storybook/theming: 7.0.20 => 7.0.20
    @storybook/vue: 7.0.20 => 7.0.20
    @storybook/vue-webpack5: 7.0.20 => 7.0.20
    @storybook/vue3: 7.0.20 => 7.0.20
    @storybook/vue3-webpack5: 7.0.20 => 7.0.20

Additional context

This used to work in older versions of Storybook, but I don't remember what exact version that was. Likely Storybook 6 though.

Tried Storybook v7.1.0-alpha.36 as well, the issue is still there.

@shilman
Copy link
Member

shilman commented Jun 19, 2023

@chakAs3 is this something you can take a look at? seems like it is likely related to the recent vue3 reactivity changes

@shilman shilman moved this to Empathy Backlog in Core Team Projects Jun 19, 2023
@chakAs3
Copy link
Contributor

chakAs3 commented Jun 20, 2023

hi, @shilman @paulgv the default build is using vue 2.7, if you use vue3 source block is reactive. still, I will check the vue2 source implementation and fix it soon

@shilman
Copy link
Member

shilman commented Jun 20, 2023

Thanks for checking @chakAs3--great to know this is vue2 issue!

@shilman shilman added vue and removed vue3 labels Jun 20, 2023
@chakAs3
Copy link
Contributor

chakAs3 commented Jun 20, 2023

Thanks for checking @chakAs3--great to know this is vue2 issue!

yes, actually there are other little issues, dated that I planned to look at.

@chakAs3
Copy link
Contributor

chakAs3 commented Jun 20, 2023

@shilman it is green #23149 if you want to merge it

@github-project-automation github-project-automation bot moved this from Empathy Backlog to Done in Core Team Projects Jul 24, 2023
@paulgv
Copy link
Author

paulgv commented Aug 22, 2023

Thanks for the fix! I can confirm that this seems to have been resolved in the latest version (upgrading to v7.3 as of writing this).

@chakAs3
Copy link
Contributor

chakAs3 commented Aug 23, 2023

Thanks for the fix! I can confirm that this seems to have been resolved in the latest version (upgrading to v7.3 as of writing this).

Welcome @paulgv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants