-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Backwards compatibility for viewport addon #5458
Comments
@tmeasday Was the viewport functionality modified or removed in version 5? I have heard no mention of it in new threads. Last time I checked, I saw it in the codebase. |
Hey @CodeByAlex, sorry I missed this. The viewports addon now lives it the toolbar at the top! You can see it in the latest official storybook: https://5c638d7c9a7643000809952f--storybooks-official.netlify.com/?path=/story/ui-panel--default Note this icon in the toolbar: Thanks for the detailed report and sorry about the slow response. |
@tmeasday That looks great! but im not seeing it in the angular cli "next" demo: Also, do we still have to include the addon? |
Hey @CodeByAlex, the addon is not currently used in that demo. You do still need to install and register it. |
@tmeasday, are we sure this works on the angular version. Im still not seeing it in the toolbar when installing and registering with the latest: |
Hi @CodeByAlex -- how did you install the addon? Can you upload a version of your code somewhere? |
Hey @tmeasday , I am unable to upload the full codebase that I am using but here is the config code:
Here is the addonJS:
Here are the dev deps from the package json:
Those are the only places I'm referencing the viewport addon |
I am seeing this though: warn: ["usage is deprecated, use .addParameters({ viewport }) instead"] |
OK, it looks like maybe we can add better back-compat here. |
@tmeasday Am I adding it in incorrectly? |
@CodeByAlex sure, so the new API is just configure it via parameters: // Get rid of this
addDecorator(configureViewport);
// Instead just use
addParameters({
// If you want to configure viewports. You can do this at the story or chapter level too
viewport: { ... }
}); |
I guess it should still be showing up. I'll dig into that |
Thanks, for good measure I tried removing the configure and it didnt show so it must be something else |
I'm closing this as a duplicate to #5757. Please feel free to re-open if you think there's something angular-specific here or this is not a dupe. |
Describe the bug
The viewport tab has gone missing when upgrading any version of major version 5 when running in an angular environment.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Viewport tab should be available like it was in V4
Screenshots
If applicable, add screenshots to help explain your problem.
System:
addon-notes
addon-knobs
addon-a11y
addon-viewport
addon-actions
Additional Info
This can not be seen in the angular-cli example because the example does not use the viewport addon
The text was updated successfully, but these errors were encountered: