Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/navigation no longer available on the Widgets screen #36469

Open
paulwilde opened this issue Nov 13, 2021 · 13 comments
Open

core/navigation no longer available on the Widgets screen #36469

paulwilde opened this issue Nov 13, 2021 · 13 comments
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Enhancement A suggestion for improvement.

Comments

@paulwilde
Copy link
Contributor

paulwilde commented Nov 13, 2021

Description

Updating the plugin to 11.9.0 seems to have broken core/navigation on the Widgets screen. Previously it was an available block, but now it's no longer possible to be selected.

Step-by-step reproduction instructions

  1. Try to add a core/navigation block into the Widget screen
  2. You will not see it is unavailable to add
  3. If you had an existing block it now says Your site doesn’t include support for the "core/navigation" block. You can leave this block intact or remove it entirely.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@annezazu annezazu added [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Question Questions about the design or development of the editor. labels Nov 18, 2021
@annezazu
Copy link
Contributor

annezazu commented Nov 18, 2021

Thanks for reporting this! Flagging for some devs who might be able to share some insight. I can confirm the navigation block isn't an option in the block widgets editor but I do see a Navigation Menu option that allows you to add in a menu. I wasn't able to see at a glance any PRs that might have impacted this recently but could be missing some insight!

@annezazu
Copy link
Contributor

To follow up here, this was an intentional change to remove the navigation block from the widgets editor for the Gutenberg plugin:

#35979

Since the navigation block was never ported to core, there has not been a core version in the widgets screen. When preparing for 5.9, some folks made changes to ensure that as the navigation block on it's own shouldn't be present in that screen right now. As a result, I'm going to close this out as there's not much that can be fixed here I'm afraid.

@coreyworrell
Copy link
Contributor

@annezazu Navigation block is now in core, so shouldn't it be allowed on the widgets screen? Does not work still in 5.9.3

@isuke01
Copy link

isuke01 commented Dec 14, 2022

@annezazu Still an issue with 6.1.0. Block is missing from widgets.

@annezazu
Copy link
Contributor

@scruffian mind following up on this as someone deeply involved in current navigation block work? For now, going to re-open this!

@annezazu annezazu reopened this Dec 15, 2022
@scruffian
Copy link
Contributor

We do have a classic menus widget. Is there a need for a navigation block widget too?

@spencer-j
Copy link

@scruffian a classic menu is not a navigation block,
if i have core/navigation menu somewhere i also might want to include it in the widget area.
As of now i can't even do it with the "allowed_block_types_all" filter see.
#28517 (comment)
this is inconsistent when navigation block isn't addable with this filter.
Greets spencer

@scruffian
Copy link
Contributor

I believe the thinking here is that if you're on a classic theme you're restricted to using classic menus. If you want to take advantage of the navigation block you'd need to update to a block theme. I can see that in some cases there might be a need to add a navigation block to a classic theme, but this feels like a lower priority item so not something we're likely to work on soon.

@spencer-j
Copy link

@scruffian: I'm working on a FSE theme and use widgets. In this case widgets should not be accessible or addable to FSE/Block themes at all. As the core/navigation was available in the widget, what was the justified reason to remove it? right now i can only read
"When preparing for 5.9, some folks made changes to ensure that as the navigation block on it's own shouldn't be present in that screen right now"

@getdave
Copy link
Contributor

getdave commented Jan 3, 2023

@talldan Do you recall any reason not to enable core/navigation on the Widgets screen?

As far as I can see we should now be able to safely enable it.

@getdave
Copy link
Contributor

getdave commented Jan 3, 2023

I looked into this and it's deliberately disabled here

block.name.startsWith( 'core/navigation' )

Perhaps we intentionally did this as it's one of only a few blocks that require entities to function.

Looks like this was added by @noisysocks in https://github.com/WordPress/gutenberg/pull/35979/files#diff-b6ec05011df6210b0fc76d8db93fb2e615dc7c97d0fc0ce664e8f1d3c53768c4R59.

Maybe he can also shed some light on the decision process behind this?

@noisysocks
Copy link
Member

The multi-entity save flow hasn't been implemented in the widgets screen and so blocks that use entities (Template Part, Navigation, etc.) won't work. We therefore disable them.

The challenging part of implementing multi-entity saving in widgets is that we need to make it work in the customiser which has a considerably different UI and technical architecture.

Aside from that, it's something that is doable but just hasn't been done yet 😅

@getdave
Copy link
Contributor

getdave commented Jan 9, 2023

Thanks @noisysocks.

So next steps here are:

  • consider whether to add multi-entity saving flow to Widgets screen
  • reinstate entity-based blocks

The team working on Navigation block are currently focused on the UX of the block so I don't see us getting around to working on this anytime in the near future.

Perhaps @priethor can consider if/when this should be placed on the wider Gutenberg project roadmap?

@tellthemachines tellthemachines added [Type] Enhancement A suggestion for improvement. and removed [Type] Question Questions about the design or development of the editor. labels Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

9 participants