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

Navigation Block: Buttons Block can't be inserted from the "Add Link" modal #54877

Open
liviopv opened this issue Sep 27, 2023 · 12 comments
Open
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@liviopv
Copy link

liviopv commented Sep 27, 2023

What problem does this address?

I'm not sure if this is intentional, but when testing the new support for the Buttons Block in Navigation, I noticed that there is no way of adding a Button by clicking on the [+] button that shows up inline in the Navigation Block and pulls up the option to search for links or add Search/Social/Logo/Page List.

Clicking on an empty "Custom Link" menu item also doesn't allow you to select a button block. The only way of adding a Button seems to be from the menu editing tag in the Block Inspector sidebar:

CleanShot.2023-09-27.at.15.56.07.video-converter.com.mp4

What is your proposed solution?

Buttons should be treated like other blocks allowed in the Navigation Block, meaning they should show up in the Transform options, and should show up when searching for button/s.

@liviopv liviopv changed the title Navigation Block: Buttons Block can't be inserted from the "Add Link" Sep 27, 2023
@Mamaduka Mamaduka added [Type] Help Request Help with setup, implementation, or "How do I?" questions. [Block] Navigation Affects the Navigation Block labels Sep 27, 2023
@jordesign jordesign added [Type] Bug An existing feature does not function as intended and removed [Type] Help Request Help with setup, implementation, or "How do I?" questions. labels Sep 27, 2023
@jordesign
Copy link
Contributor

Confirmed in testing with the most recent beta - there's no option to insert a button from the inline inserter

@bph
Copy link
Contributor

bph commented Sep 28, 2023

It's correct that the button block isn't available via the Inserter!

The button can be successfully added to the Navigation menu via the Sidebar in the Site Editor.

button.in.header.navigation.mp4
@bph
Copy link
Contributor

bph commented Sep 28, 2023

After I added a button to the navigation, the button would also be available in the inserter in the canvas. Definitely a bug. :-) Thanks for reporting. @liviopv

@annezazu
Copy link
Contributor

Noting that the other option is through transforming a block:

Screenshot 2023-09-28 at 9 32 24 AM
@annezazu
Copy link
Contributor

annezazu commented Oct 5, 2023

@torounit or @scruffian since you two worked on this, might one of you be able to dig in to get this into the 6.4 release cycle? Right now, the option is quite hidden and hard to get to making for a subpar user experience.

@Sidsector9
Copy link
Contributor

Sidsector9 commented Oct 6, 2023

Hello everyone 👋

I have raised a PR for this issue and would love your thoughts on the same - PR #55126

@torounit
Copy link
Member

torounit commented Oct 7, 2023

Fixed this issue in #55144

Add Buttons to Transfrom as well as Search/Social/Logo/Page List.

@Sidsector9
Copy link
Contributor

@torounit Just saw your PR. Since the featured block has limited options, for example it doesn't have the Submenu block, in this case what is the general approach to add the Submenu after a custom link? Is transforming a custom link to Submenu block the only option the user has?

@torounit
Copy link
Member

torounit commented Oct 9, 2023

@Sidsector9
Right now, I think the only way to insert a submenu is to insert a custom link and then transform it.
Also, spacer and the like are allowed to be inserted into Navigation block, but there is usually no way to insert them.

And I think it is a confusing behavior to add elements in different ways depending on the type of InnerBlock block.

I think these problems should be solved by other issue or pull request.

@getdave
Copy link
Contributor

getdave commented Oct 13, 2023

For context, the reason for this conditional behaviour is to try and keep the block simple for the most common use case which us just inserting a link to a Page.

Therefore, if your Navigation contains only "simple" blocks (links and some other whitelisted blocks) then when you click the + inserter it will auto-insert a link into the Navigation. Whereas if you Navigation already contains more complex blocks then when you click + you are required to first choose the type of block.

As @richtabor mentioned, we are looking at improving this flow by changing the behaviour of the <LinkControl> component.

@annezazu
Copy link
Contributor

Noting that this should ease the experience greatly and close this issue out: #57756

@getdave
Copy link
Contributor

getdave commented Jan 24, 2024

Noting that this should ease the experience greatly and close this issue out: #57756

We need more eyes on this change though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
8 participants