-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[test] Remove top-level inline-block from the regression tests #43656
Changes from all commits
08e35d0
497087c
bbd400f
c5e007e
3d76901
ae345c1
a68ac62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -49,6 +49,12 @@ function TestViewer(props) { | |||||
}; | ||||||
}, []); | ||||||
|
||||||
const viewerBoxSx = { | ||||||
display: 'block', | ||||||
p: 1, | ||||||
position: 'relative', | ||||||
}; | ||||||
|
||||||
return ( | ||||||
<React.Fragment> | ||||||
<GlobalStyles | ||||||
|
@@ -77,7 +83,7 @@ function TestViewer(props) { | |||||
<JoyBox | ||||||
aria-busy={!ready} | ||||||
data-testid="testcase" | ||||||
sx={{ bgcolor: 'background.body', display: 'inline-block', p: 1 }} | ||||||
sx={{ bgcolor: 'background.body', ...viewerBoxSx }} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would this be enough?
Suggested change
It still makes the screenshots to take more space, so the diff might be slower, but we pay per screenshots now, so we don't have to care so much 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, it has the same effect. I'm indifferent to the exact solution, as long as it's not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we ok with docs demos potentially looking slightly different to their corresponding regression screenshots? If that's ok There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There's a nuance here that not all screenshots are originating from docs demos. Some come from the templates. And I believe there's a set of separately curated ones as well. This is what made me open this PR in the first place as the templates behave flaky when rendered in an inline container. I think in light of that, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, |
||||||
> | ||||||
{children} | ||||||
</JoyBox> | ||||||
|
@@ -86,7 +92,7 @@ function TestViewer(props) { | |||||
<Box | ||||||
aria-busy={!ready} | ||||||
data-testid="testcase" | ||||||
sx={{ bgcolor: 'background.default', display: 'inline-block', p: 1 }} | ||||||
sx={{ bgcolor: 'background.default', ...viewerBoxSx }} | ||||||
> | ||||||
{children} | ||||||
</Box> | ||||||
|
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.
Can we remove this one?
I think we want to be able to catch cases where demos relies on a special parent position properly to be set. When developers copy and past a demo, they won't have this style set.
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'll open a PR for this cc @Janpot
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.
#43743