Skip to content

feat: add DeprecatedFontsOnSettingsData check for config/settings_data.json#1174

Open
SinhSinhAn wants to merge 1 commit intoShopify:mainfrom
SinhSinhAn:feat/deprecated-fonts-settings-data
Open

feat: add DeprecatedFontsOnSettingsData check for config/settings_data.json#1174
SinhSinhAn wants to merge 1 commit intoShopify:mainfrom
SinhSinhAn:feat/deprecated-fonts-settings-data

Conversation

@SinhSinhAn
Copy link
Copy Markdown

Summary

  • Add new DeprecatedFontsOnSettingsData JSON check that warns on deprecated font handles in config/settings_data.json

This complements the existing DeprecatedFontsOnSectionsAndBlocks (sections/blocks {% schema %} tags) and DeprecatedFontsOnSettingsSchema (config/settings_schema.json) checks by covering the remaining unchecked surface: saved preset values in settings_data.json.

How it works

The check walks all string literal Property values in config/settings_data.json and flags any that match the shared DEPRECATED_FONT_HANDLES set. This covers:

  • current settings (live theme values)
  • presets (theme demo presets)
  • Deeply nested block settings within presets

Implementation details

  • Reuses the shared DEPRECATED_FONT_HANDLES set from deprecated-fonts-data.ts
  • Follows the same pattern as DeprecatedFontsOnSettingsSchema
  • Registered in allChecks with recommended: true

Tests

6 test cases covering:

  • Deprecated font in current settings
  • Deprecated fonts in presets
  • No warnings for non-deprecated fonts
  • No warnings for non-string values
  • File targeting (only config/settings_data.json)
  • Deeply nested block settings

All existing tests continue to pass (21 tests across the other two deprecated font checks).

Closes #1008

Add a new theme check that warns when `config/settings_data.json`
contains deprecated font handles. This complements the existing
`DeprecatedFontsOnSectionsAndBlocks` and `DeprecatedFontsOnSettingsSchema`
checks by covering the saved preset values in settings_data.json,
which was the remaining unchecked surface for deprecated fonts.

The check walks all string literal values in the JSON and flags any
that match the shared DEPRECATED_FONT_HANDLES set.

Closes Shopify#1008
@SinhSinhAn SinhSinhAn requested a review from a team as a code owner April 10, 2026 07:33
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.

Check for deprecated fonts

1 participant