WordPress / gutenberg

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

Consider control for re-assigning a core/page-link block's page #49735

Open richtabor opened 1 year ago

richtabor commented 1 year ago

What problem does this address?

To change say an About page to your site's "Now" page, you need to first delete the About page link, select the parent Navigation block, then re-add via the Inserter (or the new list view within the Navigation block).

We can simplify this by having a chip/token of the selected page within the Block Inspector. When you select it, you should be able to search for, and add other pages.

What is your proposed solution?

Instead of a delete/add-again flow, you would be able to click the clip/token selector to swap the page. We already have this UI, which could be leveraged perhaps, as well as other page link designs floating around:

I was thinking it could be the first control in the Block Inspector:

CleanShot 2023-04-11 at 17 26 24

CleanShot 2023-04-11 at 17 31 07

richtabor commented 1 year ago

Related in part to https://github.com/WordPress/gutenberg/issues/48072

richtabor commented 1 year ago

Related https://github.com/WordPress/gutenberg/issues/49091#issuecomment-1473301725

getdave commented 1 year ago

@richtabor This PR starts to do what you are asking for I think https://github.com/WordPress/gutenberg/pull/46981.

If it does and you feel it's important then please do let me know.

richtabor commented 1 year ago

@richtabor This PR starts to do what you are asking for I think https://github.com/WordPress/gutenberg/pull/46981.

I think it's a nice-to-have, compared to the current experience, though a bit more similar to the edit/search/replace flow here, where you can choose a different page from a popover perhaps.