Skip to content

Accept visible_if on setting types that ignore it - #1922

Open
stephanie-shopify wants to merge 2 commits into
mainfrom
visible-if-unsupported-types-accepted
Open

stephanie-shopify wants to merge 2 commits into
mainfrom
visible-if-unsupported-types-accepted

Conversation

@stephanie-shopify

@stephanie-shopify stephanie-shopify commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Why

Shopify Core is changing so that visible_if on a setting type that doesn't support it is accepted and ignored, instead of failing the file save. The affected types are article, article_list, blog, collection, collection_list, metaobject, metaobject_list, page, product, product_list, color_scheme_group and color_palette. The theme editor always shows those settings. visible_if never affects storefront output, and failing saves on it was causing support issues.

Core PR: https://meteorite.shopify.io/repos/shop/world/pulls/2172172 (stack: 2172229)

Theme Check runs these schemas under ValidSchema, which reports every schema problem as an error. So this PR stops treating visible_if as an unknown property on those types. A paired Theme Check PR (Shopify/theme-tools#1339) adds an UnsupportedVisibleIf warning so developers still find out it's ignored.

What

  • New ignoredConditionalSetting definition, with a description explaining that the property is ignored. The value must be a string, matching Core, which rejects non-strings because Canvas reads the raw schema and expects a string.
  • visible_if references it on each of the unsupported types.
  • Nested settings inside a color_scheme_group definition are unchanged and still reject visible_if, matching Core.

Merge order

Merge after the Core stack ships. Otherwise Theme Check will pass files that Core still rejects on save.

Tests

The "should not allow visible_if on %s" tests in section.spec.ts / theme_block.spec.ts / color_palette.spec.ts now check that visible_if is accepted.

@stephanie-shopify
stephanie-shopify marked this pull request as ready for review October 14, 2026 16:27
@stephanie-shopify
stephanie-shopify requested a review from a team as a code owner October 14, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant