Skip to content

Conversation

@myovchev
Copy link
Contributor

@myovchev myovchev commented Oct 21, 2025

DO NOT MERGE UNTIL AFTER RELEASE

  • Add Layout widget support
  • Update styles
  • Remove obsolete lib

- Introduced '@apostrophecms/layout' widget in home and default page areas.
- Updated layout styles to allow for a wider main content area.
- Improved HTML structure for better layout management.
@linear
Copy link

linear bot commented Oct 21, 2025

@myovchev myovchev marked this pull request as draft October 21, 2025 07:51
@myovchev myovchev requested a review from BoDonkey October 21, 2025 07:52
Copy link
Contributor

@BoDonkey BoDonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite get the second area on the default page. Why break video out to a standalone area?

Copy link
Member

@boutell boutell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is only a draft and I am reviewing prematurely so this is a comment, not a blocker.

I think you should use 12 steps, and also explicitly configure the column widget's allowed contents even if it's the same as the default, so that it is easier for developers to understand how to add widgets to it. Otherwise layout feels like a black box and people reading Bob's documentation site won't really know what to do to add their very first custom widget.

options: {
widgets: {
'@apostrophecms/layout': {
columns: 6,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use 12

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not appropriate here, it's tested and feels right in the context of the space it has.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Default page has 12. This also showcases the option override.

@@ -0,0 +1,18 @@
// Modify the layout column widget to allow the desired content types
// in the Layout widget.
export default {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boutell Explicit define so that it's clear how to modify.

@myovchev
Copy link
Contributor Author

I don't quite get the second area on the default page. Why break video out to a standalone area?

@BoDonkey It's a visual thing in the diff view. The widget list is

          widgets: {
            '@apostrophecms/rich-text': {},
            '@apostrophecms/image': {},
            '@apostrophecms/video': {}
          }

Copy link
Member

@boutell boutell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows only one level of layouts. Please demo nested layouts in a way that doesn't allow infinite nesting, and does restrict steps in a nested layout. (This means a subclass is needed.)

See the nested-layout branch for a working example although not in the lineage of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants