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
Adds a block formatting context to the preview div so that any floate… #773
Adds a block formatting context to the preview div so that any floate… #773
Conversation
…d elements are contained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -11,6 +11,8 @@ export const styles = ({ space, color, borderRadius }) => ({ | |||
padding: space[2], | |||
border: [[1, color.border, 'solid']], | |||
borderRadius, | |||
width: '100%', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a comment that it's a clearfix and why we need it here, otherwise these two lines will be eventually removed during refactoring ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, cool will do
For that we’ll need something like Cypress which would be awesome ;-) |
…ormatting context and to contain any floated components.
I think it requires too much knowledge to understand and more about how then why. I’d add more generic comment on top of these two lines, explaining what’s the problem this code is solving. |
well taken ... I tried to shorten comment and speak more to the issue being solved and not the mechanics of fix per your suggestion. Hopefully what you're looking for but lmk if you have something better :) |
Thanks, merged! |
👍 thank you! |
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](#662) by @SaraVieira) * Allow descriptions for sections ([#743](#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](#749), part of [#750](#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](#738)) * Fix color issue in Safari ([#739](#739)) * Allow overriding of renderer-only components ([#710](#710)) * Do not overflow floated elements in examples (#772, [#773](#773) by @roblevintennis) * HTML escaping in Add example block ([#741](#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](#742))
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](#662) by @SaraVieira) * Allow descriptions for sections ([#743](#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](#749), part of [#750](#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](#738)) * Fix color issue in Safari ([#739](#739)) * Allow overriding of renderer-only components ([#710](#710)) * Do not overflow floated elements in examples (#772, [#773](#773) by @roblevintennis) * HTML escaping in Add example block ([#741](#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](#742))
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](#662) by @SaraVieira) * Allow descriptions for sections ([#743](#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](#749), part of [#750](#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](#738)) * Fix color issue in Safari ([#739](#739)) * Allow overriding of renderer-only components ([#710](#710)) * Do not overflow floated elements in examples (#772, [#773](#773) by @roblevintennis) * HTML escaping in Add example block ([#741](#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](#742))
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](styleguidist/react-styleguidist#662) by @SaraVieira) * Allow descriptions for sections ([#743](styleguidist/react-styleguidist#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](styleguidist/react-styleguidist#749), part of [#750](styleguidist/react-styleguidist#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](styleguidist/react-styleguidist#738)) * Fix color issue in Safari ([#739](styleguidist/react-styleguidist#739)) * Allow overriding of renderer-only components ([#710](styleguidist/react-styleguidist#710)) * Do not overflow floated elements in examples (#772, [#773](styleguidist/react-styleguidist#773) by @roblevintennis) * HTML escaping in Add example block ([#741](styleguidist/react-styleguidist#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](styleguidist/react-styleguidist#742))
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](styleguidist/react-styleguidist#662) by @SaraVieira) * Allow descriptions for sections ([#743](styleguidist/react-styleguidist#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](styleguidist/react-styleguidist#749), part of [#750](styleguidist/react-styleguidist#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](styleguidist/react-styleguidist#738)) * Fix color issue in Safari ([#739](styleguidist/react-styleguidist#739)) * Allow overriding of renderer-only components ([#710](styleguidist/react-styleguidist#710)) * Do not overflow floated elements in examples (#772, [#773](styleguidist/react-styleguidist#773) by @roblevintennis) * HTML escaping in Add example block ([#741](styleguidist/react-styleguidist#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](styleguidist/react-styleguidist#742))
## New features * New option `editorConfig` to change CodeMirror options (#648, [#662](styleguidist/react-styleguidist#662) by @SaraVieira) * Allow descriptions for sections ([#743](styleguidist/react-styleguidist#743) by @SaraVieira) * Add TypeScript files to default components and ignore patterns ([#749](styleguidist/react-styleguidist#749), part of [#750](styleguidist/react-styleguidist#750)) ## Bug fixes * Fix global access to all components in isolation mode ([#738](styleguidist/react-styleguidist#738)) * Fix color issue in Safari ([#739](styleguidist/react-styleguidist#739)) * Allow overriding of renderer-only components ([#710](styleguidist/react-styleguidist#710)) * Do not overflow floated elements in examples (#772, [#773](styleguidist/react-styleguidist#773) by @roblevintennis) * HTML escaping in Add example block ([#741](styleguidist/react-styleguidist#741)) * Fix infinite loop caused by markdown-to-jsx ([#742](styleguidist/react-styleguidist#742))
Addresses issue: #772
@sapegin I looked for a place to add a spec e.g. src/rsg-components/Playground/Playground.spec.js but I didn't see anything else asserting on CSS things in there so I deemed this not a thing that needed specs. Please advise if otherwise. That said, Here are some screenshots to make this PR crystal clear…
Nothing broke:
Proof .. floated button gets contained (note I added the
float: right
manually in devtools):Here's the preview div with block formatting context rules applied:
Lmk if there's anything else you'd like done here. Thanks