-
Notifications
You must be signed in to change notification settings - Fork 4k
Add fullwidth page option #3344
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 11df176 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 |
To prevent unnecessary layout shift when resizing the window smaller
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
/* Blocks that can be full width are automatically expanded on full-width pages. | ||
* Ideally we'd rely on the block type to determine if it can be full width, but | ||
* the block's `fullWidth` property does not differentiate between `undefined` and `false`. | ||
* So instead we hardcode a list of blocks that can be full width. */ |
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 don't understand this comment, why would these blocks differ from others when the page is full-width?
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.
Because they automatically grow to expand the size. If we didn't do that, the page option would only affect the page's container, and you would still have to make each block full-width individually.
This way we prevent the option of having a wide page with a lot of space on the right, because any fullwidth block (tabs, tables, ...) grows automatically.
Now that the page-width option is available, we can remove the hardcoded ID and get GBO ready to use the customization option. Also makes some tiny tweaks to make the full-width option work better with different blocks and the page's loading skeleton.