Skip to content

Pattern Overrides: Add a way to reset any overrides #57751

@talldan

Description

@talldan

What problem does this address?

Part of #53705

A user can add override content in a pattern that supports overrides, but at the moment there's no way to reset those overrides to the value originally in the pattern.

Furthermore, it was noted in the tracking issue that there's a bug in the way empty override values are lost:

If you delete the content from a paragraph with editable attrib, it looks empty, which is what user may want, but saving and reloading brings back content from the original pattern, which in other cases may also be what user wants :thinking_face:

It seems like even empty override values should be retained

What is your proposed solution?

Add a way to reset/clear any pattern overrides to the pattern block.

The option is:

  • only be visible when the pattern supports overrides
  • only be enabled when there are override values
  • clicking it clears all the override values in a pattern, this should hopefully be a fairly simple task of unsetting the attribute that contains the overrides.

A follow-up to this could be to explore per-content block reset of overrides, but this is a lower priority right now.

Metadata

Metadata

Assignees

Labels

[Block] PatternAffects the Patterns Block[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Feature] Synced PatternsRelated to synced patterns (formerly reusable blocks)[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions