Pattern Overrides: Refactor block toolbar indicator #65058
Open
Description
opened on Sep 4, 2024
Inner blocks of patterns currently use a custom filter to add a block icon to the toolbar. See this code:
It was implemented this way in #62514 to try to extract the pattern specific code from the block editor package. It also worked since the pattern block leveraged contentOnly
mode where selected blocks didn't have a block icon. That is until #64694 added a block icon for contentOnly blocks.
It's pretty clear now that the abstraction for pattern overrides needs to be changed, so that rather than adding a custom icon, the normal block icon is used instead. Here's the tasks:
- Remove the filter approach and instead use the regular block icon in the toolbar, revert De-duplicate block toolbar icons for patterns #65054 in the process
- Find a way to make the overridden block icons have the purple color, maybe a declarative way to mark the overridden blocks as 'synced'.
- Find a way to display this message in the block switcher dropdown, or reconsider whether it's needed:
Activity