-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make pane
an optional region for PageLayout component
#1989
Conversation
🦋 Changeset detectedLatest commit: 9c896d4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
❤️ Love it, needing this for PageLayout propagation on dotcom
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.
Love the helpful CSS comments!
What are you trying to accomplish?
This PR adds an expected functionality to PageLayout, making the
pane
region optional, and allowing single-column pages to also benefit from PageLayout's spacing structure.I've also fixed two Storybook-related issues:
What approach did you choose and why?
PageLayout has two wrapping elements:
PageLayout-wrapper
andPageLayout-columns
.wrapper
takes care of vertical stack (header, content+pane, footer), whilecolumns
handles the horizontal the stack (content + pane).For single column layouts, I've removed
PageLayout-columns
from the markup, leavingcontent
as a direct sibling ofheader
andfooter
.Note that the
hasPane
prop from Storybook shouldn't translate 1:1 to ViewComponent or React APIs; the presence of compound components or slots should determine the region existence.What should reviewers focus on?
Are additional changes needed?