Replies: 3 comments 12 replies
-
|
I would extend your point even further and ask what's the point of templates and layouts, too! The way I see it is that over the years, Shopify has been introducing composability to the merchant via defining certain scopes of a website:
From a developer point of view, layouts, templates, sections, and blocks are all basically the same thing -- a scoped element with slot(s) to insert child content, aka components? |
Beta Was this translation helpful? Give feedback.
-
|
Interesting that you used the word philosophical because we did too. Our theme dev asked ourselves the question 'what is the difference between a section and block anymore? do we really need sections anymore? what if we pushed ourselves to build a full page as a single section, containing all the blocks?" We actually did run through that thought exercise with the homepage. Our conclusion was, it's totally possible for a page to be just one section containing a lot of blocks. Sections are now organizational concepts and they are strictly full page width. Blocks can be any width. That is currently the main difference. I realize this doesn't answer your questions on the role of sections. We do think it would be very difficult to actually deprecate sections so it's not really something we are considering right now. However, practically speaking- we do see a future where pretty much everything in a theme is a block. |
Beta Was this translation helpful? Give feedback.
-
|
The important one:
Any subfeature\component of a UI pattern a merchant Badges* are probably the most useful UI smallest example to think about what the axioms will be and where the lines are between theme-settings vs section-settings vs theme-blocks(component-settings|slot-settings) before crossing over into atom/token/utility territory. 🤔 Does the nestable-block paradigm mean .product-cards are gonna be expected to have their own headers footers blocks which in turn have badge blocks?Or just about every component gets it's own header/footer combo for allowing placement of meta info(badges,skus,vendor names,etc) For a frequency of usage guideline the largest example is homepage hero images/banners in which as many UI subcomponents as possible should probably be blocks; . As it's reasonable to expect a merchant changing the campaign for the hero-image every month. 🤔 find the most complicated landing hero you can and make it blocks and in that find a truth Beyond that it's gonna be all reasonable** upfront expectations of common frustrations for both merchants and devs , then usage reports, then feature requests. **unfortunately there's not global repo of common pattern issues in shopify themes to know what's publicly reasonable it's a miasma free for all. I feel a bit nauseous when I think about what messes I'm gonna have to wade through to fix things when slideshows start using nested blocks 😷 .
As concept/labels for UI patterns and containers for configuration of itself and children.
shuffling everything into blocks will be an anti-pattern. snippets are here to stay as liquid isn't flexible enough to let us create objects in it, unless shopify implements some sort of build tooling in the admin itself to help keep things DRY. managing the duplicated {% schema %} in blocks is gonna be obnoxious 🤢
There's a need now for better verbiage and UI, see "separator" blocks/settings which work okayish but kinda become non-intuitive when it is a HORIZONTAL separator being organized in the sections sidebar VERTICALLY , such as for a header and you need to dictate what goes left and right. Nestable-blocks solve this at least organizationally somewhat but still it's vertical settings for a horizontal visual output. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
As Shopify continues to evolve with the introduction of theme blocks, I've been revisiting the traditional role of sections within our themes. Historically, sections served as the foundational elements of Shopify themes, offering specific markup, data, and functionality tailored to various needs. However, theme blocks appear to be shifting the paradigm.
In my own work with Shopify 2.0, I've adopted a minimalist approach to sections, using them primarily as a "markup" base for injecting generic section blocks contained in snippets shared across all my "markup" sections. Then, the sections were created from the section using the
presetsschema property. Only exception were the unique sections, such as header and footer.Of course, in order to be backward compatible with older stores, sections will stay.
Nonetheless, I can clearly see theme development tend towards a one-liner (
{% content_for 'blocks' %}) monolithic section alongside some schema to handle the differentpresets.This leads to several questions :
This is quite philosophical at this point but with this new way of doing comes new practices and I'm curious how you plan to go developing with the theme blocks ?
Beta Was this translation helpful? Give feedback.
All reactions