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

Enabling addons will put height: 12px on div wrapper around PreviewConnected and make preview invisible #6087

Closed
mohsen1 opened this issue Mar 14, 2019 · 1 comment

Comments

@mohsen1
Copy link

mohsen1 commented Mar 14, 2019

After upgrading to v5 we're seeing this issue where if addons are enabled the preview is not showing up. After digging into the elements in the devtools I noticed the div that wraps PreviewConnected has following inline style:

style="height: 12px; left: 0px; top: 0px; width: 1460px;"

Screenshots
Kapture 2019-03-14 at 10 09 07

Code snippets
.storybook/addons.js

import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';
import '@storybook/addon-knobs/register';
// .storybook/config.js
import { configure } from '@storybook/react';
import registerTheme from '../src/utils/registerTheme';

registerTheme();

// automatically import all files ending in *.stories.js
const req = require.context('../stories', true, /.stories.tsx$/);
function loadStories() {
  req.keys().forEach((filename) => req(filename));
}

configure(loadStories, module);
// .storybook/webpack.config.js
module.exports = ({ config }) => {
  config.module.rules.push({
    test: /\.tsx?$/,
    loader: 'babel-loader',
    exclude: /node_modules/,
  });

  config.resolve.extensions.push('.ts', '.tsx');

  return config;
};

package.json

 "@storybook/addon-actions": "^5.0.1",
    "@storybook/addon-info": "^5.0.1",
    "@storybook/addon-knobs": "^5.0.1",
    "@storybook/addon-links": "^5.0.1",
    "@storybook/addons": "^5.0.1",
    "@storybook/react": "^5.0.1",
    "@types/chrome": "0.0.77",
 "@types/storybook__addon-actions": "^3.4.2",
    "@types/storybook__addon-knobs": "^4.0.3",
    "@types/storybook__addon-links": "^3.3.4",
    "@types/storybook__react": "^4.0.1",

System:

  • OS: MacOS
  • Device: Mac
  • Browser: Chrome
  • Framework: React
  • Addons: see snippt
  • Version: see package.json

Additional context
Add any other context about the problem here.

@mohsen1
Copy link
Author

mohsen1 commented Mar 14, 2019

This is not happening in an Incognito window so I am assuming it's some Chrome extension messing with the layout.

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

No branches or pull requests

2 participants