Skip to content

chore(storybook): Add storybook viewport addon

Enrique Alcántara requested to merge chore-storybook-viewport-addon into master

What does this MR do?

It adds storybook viewport addon to gitlab-ui storybook. The viewport add-on allows us to test components in different viewport dimensions. It also allows us to create snapshot tests of a component in different viewport configurations.

Why am I adding this add-on now?

I am working on implementing Pajamas’ typescale specification. The specification defines styles that vary according to the device’s viewport dimensions. This add-on will help me to provide robust tests that cover all possible viewport styles defined in the specs. It will also make easier for everyone to explore the typescale because I will define stories that display different viewport styles.

How did I come up with those viewport breakpoints?

Those are the same breakpoints used by bootstrap and also used by our typescale specification.

Edited by 🤖 GitLab Bot 🤖

Merge request reports