-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
In site editing, we will soon have a need for blocks to be aware of the context in which they are being edited, and their capabilities restricted accordingly. IE:
- Whilst editing a template, it should not be possible to directly edit the content of a post
- Whilst editing a post and viewing the template (Post editor: Provide a way to view the template while editing a post #27847), it should not be possible to directly edit the Header
On a per-block basis this will help to indicate whether the scope of the selected entity is local to the current document, or global.
There are two parts to this issue on the design side:
- In the scenarios above, we'll need a UI pattern to indicate how the blocks are restricted (perhaps a scrim/overlay on content, faded-out Toolbar icons, etc).
- It should be possible switch between editing the content and the template, intentionally bypassing the restrictions ad hoc.
Additional bonus part: Visual distinction for template parts due to the unique position they occupy in all of this.
This is quite complicated, but closely related to the above, so I'm adding it here for now and acknowledging that it may need to be split out in to a separate issue:
Different properties of the same block may need to be governed by different contexts. For example the alignment of the Featured Image block should be governed by the template, but the URL to the featured image should be governed by the post. It should also be possible in some cases for posts to "override" template-governed properties without needing to spawn an entirely new template, although that should also be possible when desired.