Skip to content

Add UnsupportedVisibleIf check - #1339

Open
stephanie-shopify wants to merge 1 commit into
mainfrom
visible-if-unsupported-warning
Open

stephanie-shopify wants to merge 1 commit into
mainfrom
visible-if-unsupported-warning

Conversation

@stephanie-shopify

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

Copy link
Copy Markdown
Contributor

What are you adding in this PR?

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 resource pickers like product and collection, plus color_scheme_group and color_palette. The theme editor always shows those settings. Today ValidSchema reports it as an error, which is how #932 and #963 came up.

This PR:

  • Adds UnsupportedVisibleIf and UnsupportedVisibleIfSettingsSchema (severity: warning, recommended). They report visible_if on unsupported types in section, block and local-block schemas and in config/settings_schema.json. Message: visible_if is not supported on settings of type 'product' and will be ignored. The setting is always visible in the theme editor.
  • ValidVisibleIf skips those settings, since their expression is never evaluated.
  • Shares the type list (VISIBLE_IF_UNSUPPORTED_SETTING_TYPES), which mirrors Core's CONDITIONAL_SETTING_UNSUPPORTED_TYPES.

What's next? Any followup issues?

  • shopify.dev docs page for unsupported-visible-if (the check's docs.url points there).
  • Merge after the Core stack ships.

Tophatting

{% schema %}
{ "name": "Test", "settings": [
  { "type": "checkbox", "id": "show", "label": "Show" },
  { "type": "product", "id": "p", "label": "Product", "visible_if": "{{ section.settings.show }}" }
] }
{% endschema %}

shopify theme check shows a warning on visible_if (and no ValidSchema error once the theme-liquid-docs PR is live).

Before you deploy

  • This PR includes a new checks or changes the configuration of a check
    • I included a minor bump changeset
    • I ran pnpm build and committed the updated configuration files
  • [Shopifolk] shopify.dev theme check docs PR
  • My feature is backward compatible

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant