Skip to content

Conversation

@glendaviesnz
Copy link
Contributor

What?

This is just a quick test to see how things look/work if we use only the block name as the override attribute identifier

Why?

Why not :-)

How?

Changes the attribute meta field from id to name

Testing Instructions

  • Add a synced pattern and set some pattern overrides. Make sure you set a block name for each of the overridden blocks - currently there is no UX to warn of the need for this
  • Add an instance of the pattern to a post and override the content and make sure it saves in the pattern attributes under the block name
  • Check the overridden content displays in the frontend.

@glendaviesnz glendaviesnz self-assigned this Jan 25, 2024
@glendaviesnz
Copy link
Contributor Author

Using just the block name opens up the possibility of easily switching patterns that have blocks with the same names and having the content copy over, but it also opens the possibility of users inadvertently adding blocks with the same name within a pattern and having content overwritten by mistake:

name-not-id.mp4

@glendaviesnz glendaviesnz changed the title [WIP} Patterns: Use block name instead of id for pattern overrides [WIP] Patterns: Use block name instead of id for pattern overrides Jan 25, 2024
@glendaviesnz glendaviesnz changed the title [WIP] Patterns: Use block name instead of id for pattern overrides [WIP] Patterns: Investigate override attribute naming options Jan 26, 2024
@WordPress WordPress deleted a comment from github-actions bot Jan 26, 2024
@WordPress WordPress deleted a comment from github-actions bot Jan 26, 2024
@glendaviesnz glendaviesnz changed the title [WIP] Patterns: Investigate override attribute naming options [WIP] Patterns: Investigate using block name to name override attributes Jan 26, 2024
@johnbillion johnbillion deleted the try/pattern-overrides-with-block-name branch February 10, 2025 16:49
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.

2 participants