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
[Block] NavigationAffects the Navigation Block[Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)[Type] BugAn existing feature does not function as intended
Currently the navigation block only allows (navigation) links as child blocks. There has been some exploration in #18442 to allow non-linked links, but I'm not sure that'll be viable. The idea here is that other types of blocks (like a text block in this case) could be added later, to enable a way to create richer navigation menus.
Rather than considering this a bug, I'd advocate for adding the ability to accept other types of child blocks.
Is that still also the case for top-level items? The Firefox screencast I linked shows me trying to unlink a top-level navigation item, rather than a child item.
Testing using WordPress 5.7. Twenty Twenty One. Gutenberg plugin 10.3.2
Clicking a link and removing the url. Then clicking outside of the link control box automatically adds the link back in again.
So yes one can not unlink items. Either one changes the link or one deletes the link. (There still needs to be a way to add text into the menu.)
I agree that it'd be good to allow folks to add text headings to help group navigation links. I do think we could let folks add this more directly, vs adding a link and then removing the url. For example in the inserter we might let folks pick adding a heading.
As I see it, the Link block (and its variations) requires a URL to do its job. Once set, there's no way to remove a URL, only change it. This is intentional, and I'm not sure we should build a way to "unset" a Link block's URL without some greater purpose or workflow.
A few things have changed since this ticket was created, here's a fresh look:
Notably, there's a new menu item placeholder state which does not allow you to edit a label until a link has been added. By adding this we're implicitly saying: a menu item without a link is useless. In that vein, unlinking a menu item isn't directly useful anymore. However we can be clearer about the user experience. While the "The field must be filled out" is a good start, the messaging around it can be improved. I don't know if that has to be this ticket or a separate URL component-specific one.
The second part, being able to add text to a menu, that absolutely should be possible. A brief (and intentionally crazy) exploration suggests that's not going to be too hard. The biggest challenge for that is this ticket. I'm tinkering with a mockup (wip) that relies on being able to add single paragraphs, so it's definitely something we want.
Now that #29036 has been resolved, would this issue be fixed if we allowed adding Paragraph blocks at the top level of the Navigation block? If so, that's easy to sort out 🙂
Good thought @tellthemachines. If not the paragraph, then at least a range of other blocks would bring value, so I created #33278 to track that.
If we were to allow the Paragraph block, would that change the default behavior of the appender? I'd think we'd still want the black plus being the only way to add items, rather than having an input field with a slash command prompt.
If we were to allow the Paragraph block, would that change the default behavior of the appender? I'd think we'd still want the black plus being the only way to add items, rather than having an input field with a slash command prompt.
We'd have to look into it, though I'm starting to think using Paragraph might not be a good idea, for multiple reasons outlined here.
@draganescu Worth noting that we may need to create a follow up to address another part of this Issue which is that folks want to be able to create link items which have no hyperlink. I believe this is what @tellthemachines is addressing in #33775
[Block] NavigationAffects the Navigation Block[Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)[Type] BugAn existing feature does not function as intended
Activity
karmatosed commentedon Dec 2, 2019
I can confirm I also am unable to remove a link once added. Thanks for finding this @sophiegyo.
obenland commentedon Dec 3, 2019
Currently the navigation block only allows (navigation) links as child blocks. There has been some exploration in #18442 to allow non-linked links, but I'm not sure that'll be viable. The idea here is that other types of blocks (like a text block in this case) could be added later, to enable a way to create richer navigation menus.
Rather than considering this a bug, I'd advocate for adding the ability to accept other types of child blocks.
/cc @mtias
sophiegyo commentedon Dec 9, 2019
Is that
stillalso the case for top-level items? The Firefox screencast I linked shows me trying to unlink a top-level navigation item, rather than a child item.paaljoachim commentedon Apr 8, 2021
Testing using WordPress 5.7. Twenty Twenty One. Gutenberg plugin 10.3.2
Clicking a link and removing the url. Then clicking outside of the link control box automatically adds the link back in again.
So yes one can not unlink items. Either one changes the link or one deletes the link. (There still needs to be a way to add text into the menu.)
gwwar commentedon Apr 8, 2021
I agree that it'd be good to allow folks to add text headings to help group navigation links. I do think we could let folks add this more directly, vs adding a link and then removing the url. For example in the inserter we might let folks pick adding a heading.
Were there any thoughts on this already? cc @jasmussen or @scruffian
As a quick example Amazon does the following, to group links together. Notice how "Trending" isn't a link
shaunandrews commentedon Apr 8, 2021
What purpose does "unlinking" a Link block serve?
As I see it, the Link block (and its variations) requires a URL to do its job. Once set, there's no way to remove a URL, only change it. This is intentional, and I'm not sure we should build a way to "unset" a Link block's URL without some greater purpose or workflow.
jasmussen commentedon Apr 9, 2021
A few things have changed since this ticket was created, here's a fresh look:
Notably, there's a new menu item placeholder state which does not allow you to edit a label until a link has been added. By adding this we're implicitly saying: a menu item without a link is useless. In that vein, unlinking a menu item isn't directly useful anymore. However we can be clearer about the user experience. While the "The field must be filled out" is a good start, the messaging around it can be improved. I don't know if that has to be this ticket or a separate URL component-specific one.
The second part, being able to add text to a menu, that absolutely should be possible. A brief (and intentionally crazy) exploration suggests that's not going to be too hard. The biggest challenge for that is this ticket. I'm tinkering with a mockup (wip) that relies on being able to add single paragraphs, so it's definitely something we want.
tellthemachines commentedon Jul 8, 2021
Now that #29036 has been resolved, would this issue be fixed if we allowed adding Paragraph blocks at the top level of the Navigation block? If so, that's easy to sort out 🙂
jasmussen commentedon Jul 8, 2021
Good thought @tellthemachines. If not the paragraph, then at least a range of other blocks would bring value, so I created #33278 to track that.
If we were to allow the Paragraph block, would that change the default behavior of the appender? I'd think we'd still want the black plus being the only way to add items, rather than having an input field with a slash command prompt.
tellthemachines commentedon Jul 9, 2021
We'd have to look into it, though I'm starting to think using Paragraph might not be a good idea, for multiple reasons outlined here.
getdave commentedon Jul 30, 2021
Just to say that we have added an
Unlinkbehaviour in the Post Editor. I can add this to the Nav Editor as well.Update: PR to implement this now ready for review in #33777
draganescu commentedon Aug 4, 2021
Closed by #33777
getdave commentedon Aug 4, 2021
@draganescu Worth noting that we may need to create a follow up to address another part of this Issue which is that folks want to be able to create link items which have no hyperlink. I believe this is what @tellthemachines is addressing in #33775
jasmussen commentedon Aug 4, 2021
#33091 would also be related to link items with no link, insofar as that ticket can only be addressed if we were to allow that.
tellthemachines commentedon Aug 30, 2021
Hm, I think this was mistakenly closed; it's not possible to create navigation items that render on the front end without links yet.