Skip to content

Conditional settings (visible_if) not working on sidebar settings #999

@prestarocket

Description

@prestarocket

Describe the bug
According to the documentation, conditional settings should work on all sidebar settings (https://shopify.dev/docs/storefronts/themes/architecture/settings#conditional-settings).
On header settings, it doesn't work at all, and on paragraph settings, it works but I get a theme check alert: ‘Property visible_if is not allowed.theme-checkValidJSON’.

Source

  {
        "type": "checkbox",
        "id": "headings_font_advanced_settings",
        "label": "t:settings_schema.commons.apply_advanced_settings",
        "default": false,
        "info": "If you apply advanced settings, you need to set the font size for each heading"
      },
      {
        "type": "header",
        "content": "t:settings_schema.typography.h1.size_heading",
        "visible_if": "{{ settings.headings_font_advanced_settings == true }}"
      },
      {
        "type": "paragraph",
        "content": "t:settings_schema.typography.commons.info_advanced_settings_headings",
        "visible_if": "{{ settings.headings_font_advanced_settings == false }}"

      },      

Expected behaviour
Header should be hidden with visible_if

Actual behaviour
header is never hidden
https://github.com/user-attachments/assets/1a69673d-72ad-4595-83f9-4aca59a0b94d

Debugging information

  • OS : Mac
  • OS Version : 14.6.1 (23G93)
  • Theme Check Version (unknown)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions