Describe the bug
Addon-viewport tab does not show in storybook
There are no issues in starting up storybook.
Is there something I'm missing in configuration?
To Reproduce
Steps to reproduce the behavior:
npm install --save-dev @storybook/addon-viewportimport '@storybook/addon-viewport/register'; inside addons.jsExpected behaviour
The Viewports tab is expected to show up in Storybook
Screenshots

Code snippets
This is my config.js
import { configure } from '@storybook/react';
import { addParameters } from '@storybook/react';
import {
configureViewport,
INITIAL_VIEWPORTS
} from '@storybook/addon-viewport';
import 'Styles/index.scss';
// automatically import all files ending in *stories.js
const req = require.context('Components', true, /stories\.js$/);
const loadStories = () => {
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);
const newViewports = {
mobile: {
name: 'Mobile',
styles: {
width: '320px',
height: '568px'
}
},
tablet: {
name: 'Tablet',
styles: {
width: '768px',
height: '1024px'
}
},
laptop: {
name: 'Laptop',
styles: {
width: '1200px',
height: '1024px'
}
},
desktop: {
name: 'Desktop',
styles: {
width: '1366px',
height: '1024px'
}
},
wide: {
name: 'Wide',
styles: {
width: '1920px',
height: '1080px'
}
}
};
configureViewport({
viewports: newViewports,
defaultViewport: 'Mobile'
});
this is my addons.js
import '@storybook/addon-viewport/register';
import '@storybook/addon-actions/register';
import '@storybook/addon-knobs/register';
System:
It's now in the toolbar at the top of the screen, furthest icon on the right. Do you need it to show up in a tab?
Ah! It was in a tab in previous versions, next to Knobs tab so I was confused why it wasn't here.
https://github.com/storybooks/storybook/blob/master/addons/viewport/docs/viewport.png
I don't think this issue should be closed since the Readme is still wrong and causing confusion.
@lhguerra Mind taking a pass at updating the README and creating a small PR?
@shilman not at all. Will do it tonight.
@shilman Is it still possible to have it as a tab? instead of an icon with drop-down options
@mkchx Not AFAIK. @ndelangen any plan on making addon UI more portable? Seems like people want to move stuff around
Most helpful comment
@mkchx Not AFAIK. @ndelangen any plan on making addon UI more portable? Seems like people want to move stuff around