Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Legacy Template block is always rendered full width #5092

Closed
Aljullu opened this issue Nov 8, 2021 · 0 comments · Fixed by #5093 or #5105
Closed

Legacy Template block is always rendered full width #5092

Aljullu opened this issue Nov 8, 2021 · 0 comments · Fixed by #5093 or #5105
Assignees
Labels
focus: FSE Work related to prepare WooCommerce for FSE. type: bug The issue/PR concerns a confirmed bug.

Comments

@Aljullu
Copy link
Contributor

Aljullu commented Nov 8, 2021

The templates we have been creating as part of the Store Editing Templates v1 project render the Legacy Template block directly into the content, that causes it to take all the available wide space.

Single product template

I took a look at how that's done in other templates, and they seem to use a Group block with the attribute {"layout":{"inherit":true}}, that way it gets the correct width from the theme.

Some themes also add custom class names to that Group block, but given that this depends on the theme, that's not something we can implement on our end.

This issue is about updating the templates under /templates/block-templates/ and replace:

<!-- wp:woocommerce/legacy-template {"template":"single-product"} /-->

with:

<!-- wp:group {"layout":{"inherit":true}} -->
<div class="wp-block-group"><!-- wp:woocommerce/legacy-template {"template":"single-product"} /--></div>
<!-- /wp:group -->
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: FSE Work related to prepare WooCommerce for FSE. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
1 participant