Block Targeting now in Theme blocks developer preview #26
Replies: 4 comments 3 replies
-
Hello :), First of all, thanks for the work on this. This solves one of the biggest issue with the original architecture. I played with the new reference theme, and while this is better, I still find it surprisingly confusing and hard to use. The concept of a generic "Custom section" and way too many generic blocks make it extremely painful to build layout, compared to the old approach. In its current state, there is no way I will implement it this way in our themes. It is also way to easy to break: From here, I was really stuck and did not really manage to create a simple layout. Instead of a generic "Group" and trying to fit everything, I am rather planning to think of more specialized blocks, for instance, a "Product list" block, a "Collection list" block... that would only accept a very limited subset of content. However, as I understand it, this is the first step of a bigger upgrade (flex sections), and I think it would be very useful to know a bit more about the "bigger story" and how you plan to actually make flex sections work and integrate within the theme editor. I would not really like to do such a major upgrade to our theme before realizing that your current structure was actually part of another change that I did not anticipate. Some concepts in Liquid/images of the theme editor of how you plan to implement this flex thing would help a lot. |
Beta Was this translation helpful? Give feedback.
-
Hey Michaël! This is a great point and both are definitely valid approaches. For this Reference theme, our goal is to show the degree of flexibility that is possible given the new architecture, but an approach that uses more specialized blocks can certainly work as well and there will be contexts in which it will certainly be more appropriate. We're not yet ready to share any details on flex, but what I can tell you is that we will not limit its use to only generic "custom sections" or "group" blocks. So you can still take advantage of it in the more locked down, specialized architecture that you are mentioning. We will be sharing more details on how flex will work soon, as the work for it is ongoing. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the details @tyleralsbury . One other question, are there plans to have theme blocks being rendered statically. Something like that (the @ prefix might indicate we need to render a theme block instead of a snippet, and the passed settings will be filled as if those settings would have been entered in the theme editor):
|
Beta Was this translation helpful? Give feedback.
-
This update looks great, and certainly more in line with what we imagine our bespoke theme would look like with nested blocks, and specialised blocks/sub-blocks. For eg, Featured Collection and Featured Products, would both have a "Products" block with sub-blocks of "Product Title", "Product Image", "Product Price", etc which wouldn't be available outside the "Products"/"Product Card" block, but that parent block would be available across a few other parent blocks or sections. Is there a timeline on this going GA? Summer Editions? |
Beta Was this translation helpful? Give feedback.
-
To our valued Developers,
Our team continues to make substantial investments throughout the course of the year to enhance Online Store customization capabilities for merchants and developers. We are giving developers more control over the flexibility they can offer merchants and merchants more control over the changes they can make from the Editor.
Today, we’re excited to announce block targeting for Theme blocks, a highly requested feature by the theme developer community. With block targeting, Theme developers can have sections or blocks opt-in to only specific theme blocks. This gives theme developers more control of where theme blocks can be used while keeping the flexibility and reusability that Theme blocks provide.
To get started with block targeting, you must access the theme blocks developer preview:
Follow the Developer preview access steps in the theme blocks developer docs
After you’ve enabled the preview, you will be able to test out block targeting with theme blocks in a reference theme that you can upload to your development store
Finally, you can join the conversation in the Shopify Partners Slack and continue to share your feedback with us directly in the GitHub discussion board here. Stay tuned for more updates, including when Flex Sections is generally available in the future.
Shopify
Beta Was this translation helpful? Give feedback.
All reactions