You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #23021settings.__experimentalNavigationScreen was removed. This is a useful flag for allowing blocks to know when they're used in the Navigation editor.
The reason this is needed is because on the instance of, for example, the Navigation block, when the block is used in the Navigation editor to edit classic menus some features of the block are unavailable and others are required.
For example any styling applied to Navigation block in the Navigation editor does not render so the controls will be removed. Likewise, on the editor we need the Navigation block to display (as per #24875) a toggle for automatically adding new pages to the menu, but this does not work in other places, as only the Navigation editor edits classic menus.
Options
The downside of adding this flag is a kind of coupling of this block to a WP specific setting.
Another option would be to add more attributes/props to the Navigation block and customize those for every on/off requirement. For adding things which are only required on the Navigation editor we could default to always use the inspector via slots.
The text was updated successfully, but these errors were encountered:
This has been discussed on Slack and it appears that coupling blocks with such a flag is a bad idea. Instead filtering should be used to achieve the desired modification.
Description
In #23021
settings.__experimentalNavigationScreen
was removed. This is a useful flag for allowing blocks to know when they're used in the Navigation editor.The reason this is needed is because on the instance of, for example, the Navigation block, when the block is used in the Navigation editor to edit classic menus some features of the block are unavailable and others are required.
For example any styling applied to Navigation block in the Navigation editor does not render so the controls will be removed. Likewise, on the editor we need the Navigation block to display (as per #24875) a toggle for automatically adding new pages to the menu, but this does not work in other places, as only the Navigation editor edits classic menus.
Options
The downside of adding this flag is a kind of coupling of this block to a WP specific setting.
Another option would be to add more attributes/props to the Navigation block and customize those for every on/off requirement. For adding things which are only required on the Navigation editor we could default to always use the inspector via slots.
The text was updated successfully, but these errors were encountered: