#59743 closed enhancement (reported-upstream)
Block Hooks: Allow child insertion into Navigation block
Reported by: | Bernhard Reiter | Owned by: | |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
One of the original use cases for Block Hooks was inserting a Login/out block into (i.e. as the last child of) the Navigation block. Ironically, that isn't currently possible, due to the nature of the Navigation block and how it conditionally renders its child blocks or falls back to existing menus.
It's possible to work around this limitation by inserting a hooked block after the Navigation block, which is something we've e.g. done with the Mini Cart example that we've used in some of our documentation, but that's still suboptimal and plainly untenable for a text link such as the Login/out block.
We should try to make this work for 6.5.
Change History (13)
#3
@
11 months ago
@tomjcafferkey is working on a fix in the GB repo: https://github.com/WordPress/gutenberg/pull/57754.
This ticket was mentioned in PR #5946 on WordPress/wordpress-develop by @Bernhard Reiter.
11 months ago
#4
- Keywords has-patch added
Follow-up to https://github.com/WordPress/gutenberg/pull/57754.
Commit to Core once packages have been synced from Gutenberg to include https://github.com/WordPress/gutenberg/pull/57754.
@Bernhard Reiter commented on PR #5946:
11 months ago
#5
cc/ Editor Tech Leads @getdave @youknowriad
#6
@
11 months ago
- Milestone 6.5 deleted
- Resolution set to reported-upstream
- Status changed from new to closed
Setting to resolved as resolved-upstream
, as this is tackled by https://github.com/WordPress/gutenberg/pull/57754, which has now been merged; the code changes will be carried over by an npm package sync.
The only thing left to do after that has happened will be to update some PHPDoc: https://github.com/WordPress/wordpress-develop/pull/5946
@youknowriad commented on PR #5946:
10 months ago
#7
Is this ready to be committed, what's left here?
10 months ago
#8
Is this ready to be committed, what's left here?
Maybe let's wait for @ockham to confirm. There might be now a bit different approach used.
@Bernhard Reiter commented on PR #5946:
10 months ago
#9
Should be ready to go! Thanks all 😊
cc/ @gziolo @get_dave @ndiego