Fix labs header details alignment - #14539
Merged
Merged
Conversation
cemms1
commented
Sep 22, 2025
Contributor
Author
There was a problem hiding this comment.
Adds hideFormatHeading arg to the Split Theme decorator to allow omission of the format heading for non article stories
Optional arg and defaults to false so will not have an impact on any existing stories
cemms1
force-pushed
the
cemms1/fix-labs-header-details-alignment
branch
from
September 22, 2025 13:56
fd346aa to
37487ec
Compare
cemms1
commented
Sep 22, 2025
Comment on lines
+21
to
+27
| margin: 20px auto 100px; | ||
| min-width: 320px; | ||
| ${from.leftCol} { | ||
| min-width: auto; | ||
| max-width: 260px; | ||
| height: 400px; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Centres the story and restricts the space available to bring it closer to how it looks when used inside the FrontSection container
cemms1
commented
Sep 22, 2025
Comment on lines
+85
to
+91
| const positionStyles = css` | ||
| right: 0; | ||
| ${from.leftCol} { | ||
| left: 0; | ||
| right: auto; | ||
| } | ||
| `; |
Contributor
Author
There was a problem hiding this comment.
The main fix in this PR is to adjust the positioning of the opened details element
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
…s content, using grid layout
…mat heading on the split theme decorator for this story - allow details to open to left side on mobile and tablet screens and right side on desktop - add additional parameter to the SplitTheme decorator to allow omission of the format heading since this isn't relevant outside of articles
cemms1
force-pushed
the
cemms1/fix-labs-header-details-alignment
branch
from
September 23, 2025 10:28
37487ec to
e9ea4c8
Compare
on-ye
approved these changes
Sep 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Follows-up on #14532 to tweak the position of the opened
detailscomponent depending on the current viewport size. We now position it asleft: 0for wider breakpoints (leftCol + wide) andright: 0for narrower ones (mobile -> desktop). This ensures it does not overflow the left side of the page when used on a front.Also updates the Storybook story to bring it closer to how it looks when included in the
FrontSectioncomponent. There is a separate story inFrontSectionto show how this looks within this componentNote
As in #14532, the background colour of the container and cards is to be updated separately
Additional changes
Why?
Ensuring the details component opens in a sensible position when used within the new
LabsSectionHeadercomponent.Screenshots