Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add block rename handler (replace old->new everywhere!) #655

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

charlespwd
Copy link
Contributor

@charlespwd charlespwd commented Dec 5, 2024

What are you adding in this PR?

When a theme block gets renamed, old references will be workspace edited to the new name in all the following locations:

  • section schemas
  • block schemas
  • content_for "block", type: "old-name"
  • templates/*.json files
  • sections/*.json files
on-block-rename.mp4

Before you deploy

  • I included a minor bump changeset

@charlespwd charlespwd linked an issue Dec 5, 2024 that may be closed by this pull request
@charlespwd charlespwd force-pushed the feature/block-rename-handling branch from 9b21030 to 15cf74e Compare December 6, 2024 16:37
@albchu albchu self-requested a review December 9, 2024 21:13
@albchu
Copy link
Contributor

albchu commented Dec 9, 2024

Going to try and get the jsonc PR #656 merged as soon as we can here before assessing what kind of assistance we can apply to this PR before CP returns from holiday break.

@charlespwd charlespwd force-pushed the feature/block-rename-handling branch 2 times, most recently from ae65e1f to f40aba4 Compare January 6, 2025 19:48
@charlespwd
Copy link
Contributor Author

charlespwd commented Jan 6, 2025

I'm picking this back up with Navdeep's first stab at the tests. Couldn't figure out what his email is for the correct co-author to appear on the commit.

Co-authored-by: Navdeep Singh <[email protected]>

Whenever a block gets renamed, the following will now happen:
  1. References in files with a {% schema %} will be changed
  2. References in template files will be changed
  3. References in section groups will be changed
  4. References in {% content_for "block", type: "oldName" %} will be changed
@charlespwd charlespwd force-pushed the feature/block-rename-handling branch from f40aba4 to 51fe22e Compare January 7, 2025 13:41
@charlespwd charlespwd marked this pull request as ready for review January 7, 2025 13:46
@charlespwd charlespwd requested a review from a team as a code owner January 7, 2025 13:46
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.

Renaming a block should update old references
2 participants