-
-
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
Addon Centered causes component to disappear when zooming #7167
Comments
Can confirm I have the same issue. |
@ndom91 is this something that you would like to take a look into? I don't think it would be a terribly difficult task and we are always looking for people to contribute 😄 |
@CodeByAlex yeah ill take a look at it this evening when I have some free time :) I was hoping someone else had maybe already found a solution haha |
So unfortunately I dont have a solution yet, but I did find some things - maybe it will ring a bell for someone else.. The element disappears immediately once any css transform is applied, be it scale, transformX, translateY, translateZ, etc. In this case the zoom button adds a There is kind of a work-around which I discovered which we could implement, and that is using According to MDN zoom is a 'non-standard' property though, but has pretty good browser compatibility: |
I found the solution.
html, body{
width: 100%;
height: 100%;
} |
Looks good on my end too! Have you made a pull request? |
@ndom91 |
If you clone it first, make your change in your cloned version, and then you should be able to make a PR from there. |
Wow!! I'll try it!! |
Fix #7167 addon-centered causes component to disappear when zooming
Egads!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.0-beta.6 containing PR #7400 that references this issue. Upgrade today to try it out! You can find this prerelease on the |
@shilman |
Son of a gun!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.1.10 containing PR #7400 that references this issue. Upgrade today to try it out! |
Yay!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.0-beta.21 containing PR #7640 that references this issue. Upgrade today to try it out! You can find this prerelease on the |
@CodeByAlex @ndom91 @8beeeaaat @quentind @Hypnosphi @ndelangen @tmeasday I'm reverting #7640 and #7400. We should not be modifying the preview styles since it can conflict with the user's style and break visual tests (among other things). We'll have to come up with a different solution to this problem. @Hypnosphi suggested |
@shilman thats a really good point. I will say that addon centered applies styles to the component to place it in the center to begin with as seen here: https://github.com/storybookjs/storybook/blob/next/addons/centered/src/styles.ts If we want to make sure that styles aren’t interfering(which makes sense), we may want to consider how the addon works from the ground up. |
…th-addon-centered Core: Revert "Fix #7167 addon-centered causes component to disappear when zooming"
Yay!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.0-beta.29 containing PR #7749 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
…th-addon-centered Core: Revert "Fix #7167 addon-centered causes component to disappear when zooming"
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Boo-yah!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-alpha.21 containing PR #8442 that references this issue. Upgrade today to try it out! You can find this prerelease on the |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Component shouldnt disappear.
Screenshots
System:
The text was updated successfully, but these errors were encountered: