Replies: 1 comment
-
Great idea. Definitely thinking a lot about how we can make it easier to update things across your theme. The current divide between Theme Settings and Block Settings is of course not ideal. Similar to this, some ability for blocks to “Update the preset” and have other blocks using that preset stay update too (much like you would a heading in google docs), is another way I’ve been thinking about this. The merchant could then have more control over what parts they intentionally want as overrides, and which parts they want as related to the preset. There’s more thinking to do here, but definitely aligned with this idea. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The recently introduced feature to allow theme blocks to be statically rendered with a context is an awesome feature. We will, finally, have a great way to create product card blocks and move those settings from global settings to a block. This will make editing more visual for merchants and open the door for things that have historically been impossible, such as extra fields connected to metafields.
However, there is a big issue with that feature. In our themes, product cards have always been one of the most complex pieces of code. We support tons of layouts and options for cards. Until now, all those settings have been set in a global setting called "Product cards." This made discoverability harder for merchants, but it had one advantage: merchants could edit their settings once, and they would be automatically applied everywhere.
Because product cards are used everywhere (collection pages, search pages, featured collection sections, blog post sections, hot spot sections...), if we move to theme block-powered product cards, it will also be nearly impossible for merchants to achieve consistency. For every change they make, they must remember to navigate to dozens of templates and change the settings everywhere... This will be a huge mess, and merchants won't understand why a change they have made to a section of a product card won't apply everywhere.
Like the color scheme architecture, I suggest that theme blocks would support a concept of "scheme" that would allow a merchant to create one or more new schemes (in addition to a default pre-created scheme) to change a setting and have it applied everywhere quickly:
When a theme block has an
allow_block_scheme
attribute set to true, Shopify creates a default scheme (that cannot be deleted) that uses the preset settings. Changing a setting automatically updates the scheme, applying the change to all other sections where this scheme is used.A merchant should also be able to create another scheme to apply to a given section (for instance, if they want to make a minimal card on some context).
Of course, theme authors should be encouraged not to abuse this, as merchants might not realize that it would apply everywhere, but for things like product cards, this seems like a very needed feature (as it is implemented now, I don't think we will be able to move to this on our themes).
Beta Was this translation helpful? Give feedback.
All reactions