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

bug fix (addons/viewport): viewport iframe dimensions #5993

Merged

Conversation

evolutionxbox
Copy link
Contributor

@evolutionxbox evolutionxbox commented Mar 9, 2019

Issue: #5927

What I did

Use boxSizing: 'content-box' to override the global box-sizing rule
and allow the storybook preview iframe to have the specified dimensions
from the viewport addon config.

Fixes #5927

How to test

Before. Incorrect viewport iframe size:
Incorrect viewport iframe size

After. Corrected viewport iframe size:
Corrected viewport iframe size

  • Is this testable with Jest or Chromatic screenshots?
    No (but I don't actually know).
  • Does this need a new example in the kitchen sink apps?
    No.
  • Does this need an update to the documentation?
    No.

Use `boxSizing: 'content-box'` to override the global box-sizing rule
and allow the storybook preview iframe to have the specified dimensions
from the viewport addon config.

Fixes storybookjs#5927
@shilman shilman added bug addon: viewport patch:yes Bugfix & documentation PR that need to be picked to main branch labels Mar 10, 2019
@shilman shilman added this to the 5.0.x milestone Mar 10, 2019
@shilman
Copy link
Member

shilman commented Mar 10, 2019

Good catch and simple fix! Thanks!!! 🎊

@shilman shilman merged commit 85c05f0 into storybookjs:next Mar 10, 2019
@codecov
Copy link

codecov bot commented Mar 11, 2019

Codecov Report

Merging #5993 into next will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             next    #5993   +/-   ##
=======================================
  Coverage   34.93%   34.93%           
=======================================
  Files         648      648           
  Lines        9515     9515           
  Branches     1351     1380   +29     
=======================================
  Hits         3324     3324           
  Misses       5574     5574           
  Partials      617      617
Impacted Files Coverage Δ
addons/viewport/src/Tool.js 0% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b6a4a6f...e13656a. Read the comment docs.

@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Mar 11, 2019
shilman added a commit that referenced this pull request Mar 11, 2019
bug fix (addons/viewport): viewport iframe dimensions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: viewport bug patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Viewport Addon: Border-box modifies iframe size
2 participants