Skip to content

Add setting option icons and number bounds to the setting schema - #1850

Closed
lukeh-shopify wants to merge 1 commit into
mainfrom
lh-theme-check-new-setting-kinds
Closed

Add setting option icons and number bounds to the setting schema#1850
lukeh-shopify wants to merge 1 commit into
mainfrom
lh-theme-check-new-setting-kinds

Conversation

@lukeh-shopify

Copy link
Copy Markdown
Contributor

What are you trying to accomplish?

Add schema support and validation for new optional setting properties:

  • select settings: options can now specify an icon
  • number settings: new optional min, max, icon, and options metadata

Allows theme check to pass for these before submitting them to the server

What approach did you use?

  • Added a shared settingIcon definition, an enum of the supported snake_case icon IDs
  • Added a numberOptions definition
  • Added min/max to the number definition and option values to enforce at most one decimal digit
  • Added a radioOptions definition so radio options keep their existing shape but reject icon with a message pointing to select settings

Adds the new setting kinds from issues-merchant-workflows issue 2669:

- `settingIcon`: an enum of the 64 supported snake_case stable icon IDs,
  with an error message that points merchants and theme developers away
  from Polaris component names (`LayoutColumns3Icon`) and kebab-case
  admin handles (`layout-columns-3`).
- `selectOptions`: an optional `icon` on each option.
- `radioOptions`: a new definition for `radio` settings that rejects
  `icon` with a message pointing at `select`, so radio settings no longer
  silently accept an unsupported attribute. The shared `options`
  definition is unchanged.
- `numberOptions`: a new definition for suggested `value`/`label`/`icon`
  entries on `number` settings, where `value` is a required number with
  at most one decimal digit.
- `number`: new `min`, `max`, `icon` and `options` attributes, and one
  decimal digit of precision on `default`, `min` and `max`.

The icon list and the precision rules mirror Core's
`Theme::SettingOptionIcon` and spec validator, so the editor, the
platform and theme-check agree on what is valid. theme-check downloads
these schemas from this repository and uses them for its ValidSchema
check.

Assisted-By: devx/0e7ab314-3226-4582-ac8d-b65bca9cbfd8
@lukeh-shopify
lukeh-shopify requested a review from a team as a code owner August 5, 2026 19:27
@lukeh-shopify
lukeh-shopify force-pushed the lh-theme-check-new-setting-kinds branch from 8b23a63 to a78d549 Compare August 5, 2026 20:05
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