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

Addon-docs: Fix layout of Preview container #8628

Merged
merged 15 commits into from Nov 17, 2019

Conversation

necolas
Copy link
Contributor

@necolas necolas commented Oct 29, 2019

Issue: #8377

The Preview component doesn't always contain its content. Make sure that the Preview container has a max width of 100% of its parent so that stories it contains do not cause it to expand horizontally.

What I did

Edited some styles so the preview container cannot exceed 100% of its parent width

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

I don't know if this is something you'd include in your tests.

Make sure that the Preview container has a max width of 100% of its parent so
that stories it contains do not cause it to expand horizontally.
@vercel
Copy link

vercel bot commented Oct 29, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/storybook/monorepo/gnzndivi3
🌍 Preview: https://monorepo-git-fork-necolas-next-preview-container.storybook.now.sh

@shilman shilman added addon: docs bug patch:yes Bugfix & documentation PR that need to be picked to main branch labels Oct 30, 2019
@shilman shilman added this to the 5.2.x milestone Oct 30, 2019
@shilman
Copy link
Member

shilman commented Oct 30, 2019

Hi @necolas - thanks for putting this together! official-storybook is a collection of test stories that we use for exercising various bugs etc.

  • I went through all the stories looking for a difference on the Docs tab due to this PR
  • I added a new commit to try to test out this change, but that also didn't work.

You can see the official storybook on now.sh, auto-deployed: https://monorepo-git-fork-necolas-next-preview-container.storybook.now.sh/official-storybook/

You can also run it locally on your fork:

yarn bootstrap --core
cd examples/official-storybook
yarn storybook

Would you mind overwriting my commit with a story that exercises this change & shows how it improves the layout? I'll verify the before & after.

Thanks so much for your patience & contribution!

@ndelangen
Copy link
Member

I think there's a div that needs overflow auto here:

Screenshot 2019-11-06 at 00 04 29

@ndelangen
Copy link
Member

@shilman WDYT?

@shilman shilman modified the milestones: 5.2.x, 5.3.0 Nov 13, 2019
@necolas
Copy link
Contributor Author

necolas commented Nov 13, 2019

You can see the issue here: http://necolas.github.io/react-native-web/docs/?path=/docs/components-scrollview--horizontal

@ndelangen ndelangen self-assigned this Nov 16, 2019
@vercel vercel bot temporarily deployed to staging November 16, 2019 13:24 Inactive
@vercel vercel bot temporarily deployed to staging November 16, 2019 13:30 Inactive
@vercel vercel bot temporarily deployed to staging November 16, 2019 14:32 Inactive
@vercel vercel bot temporarily deployed to staging November 16, 2019 21:08 Inactive
@ndelangen
Copy link
Member

@shilman can this PR receive your approval?

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Thanks @necolas and @ndelangen !!!

@shilman shilman changed the title Fix layout of Preview container Addon-docs: Fix layout of Preview container Nov 17, 2019
@shilman shilman merged commit 77d6aa5 into storybookjs:next Nov 17, 2019
shilman added a commit that referenced this pull request Dec 2, 2019
Fix layout of Preview container
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: docs 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.

None yet

3 participants