Skip to content

Fix section rename updates for settings_data#1207

Open
omribz156 wants to merge 1 commit into
Shopify:mainfrom
omribz156:codex/settings-data-section-rename
Open

Fix section rename updates for settings_data#1207
omribz156 wants to merge 1 commit into
Shopify:mainfrom
omribz156:codex/settings-data-section-rename

Conversation

@omribz156
Copy link
Copy Markdown

What are you adding in this PR?

Fixes #713.

When a section file is renamed, the language server already updates references in template JSON files, section group JSON files, and {% section %} tags. This adds the same focused rename behavior for config/settings_data.json, updating only current.sections[*].type values that match the renamed section.

I also added coverage to the existing section rename handler spec and included the required patch changeset.

What's next? Any followup issues?

Nothing from this patch. It intentionally does not rename block references inside settings_data.json; the maintainer note on the issue asked to update only the section type attribute.

What did you learn?

The rename flow already had a nice split between template, section group, and Liquid tag edits, so settings_data.json could be added as one more JSON source without changing the broader rename behavior.

Tophatting

  • I added screenshots of the changes (before and after the changes if applicable)

Not applicable; language server rename behavior.

Verification:

  • yarn workspace @shopify/liquid-html-parser build
  • yarn workspace @shopify/theme-check-common build
  • yarn workspace @shopify/theme-language-server-common build
  • yarn vitest run packages/theme-language-server-common/src/renamed/handlers/SectionRenameHandler.spec.ts
  • yarn workspace @shopify/theme-language-server-common type-check

Note: yarn install --frozen-lockfile initially failed on Windows because the theme-check-vscode postinstall script calls sh scripts/fetch-syntaxes.sh; after dependencies were linked, building the needed workspaces allowed the targeted test/type-check path to run.

This was implemented with Codex assistance and manually reviewed before opening the PR.

Before you deploy

  • I included a patch bump changeset

@omribz156 omribz156 requested a review from a team as a code owner May 19, 2026 15:35
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.

Section rename handling in config/settings_data.json

1 participant