WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

List block: allow transformation of text links lists into navigation blocks #31733

Open ramonjd opened 3 years ago

ramonjd commented 3 years ago

What does this feature request address?

We've noticed that, sometimes, block editor users create unordered lists comprising links to site pages.

Screen Shot 2021-05-13 at 6 35 22 am

In such cases, the navigation block might be a more appropriate way to structure the links.

What is your proposed solution?

Offer the option to transform list blocks that contain link + text items into navigation blocks.

Screen Shot 2021-05-12 at 11 43 46 am

We would have to take nested lists into account, and transform them into nested menu items as well I imagine.

An MVP might be to migrate the list into a <nav /> container, or would we transform items into custom link blocks?

How would we handle list items that contain, for example, images or other non-text blocks? I'd imagine we'd either skip them or simply allow transformation?

Based on this issue, it seems as though the navigation block is undergoing some changes. I'm not sure how that would influence any potential transformation.

georgeh commented 3 years ago

Unless this is urgent, I think we should wait until #35870 is done, since that will make the transformation much easier.

getdave commented 3 days ago

@ramonjd Do you still feel this is a useful pattern? Seems like something that could be relatively simple to achieve but probably not a priority right now.

ramonjd commented 3 days ago

Do you still feel this is a useful pattern? Seems like something that could be relatively simple to achieve but probably not a priority right now.

I think so based on no more than a hunch 😄 I'll defer to folks more intimate with the navigation block. Agree that it's okay to be shelved until time permits. Thanks, Dave!