WordPress / gutenberg

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

Provide a way to set the homepage in the site editor #63666

Open jameskoster opened 2 months ago

jameskoster commented 2 months ago

Currently to change the homepage you have to exit the site editor and navigate to reading settings which is quite disruptive.

A simple / lightweight method for setting the homepage in the site editor could be a nice enhancement.

Utilise the page actions menu

In both data views and the page Inspector there is an actions menu which could house a shortcut to set the homepage.

homepage

Related: https://github.com/WordPress/gutenberg/issues/20338

jasmussen commented 2 weeks ago

This seems like a fairly straight-forward way to do it. I'd assume, per the separate issue we have for this, that this menu item would also be available in the ⌘K command palette? What happens when you press "Confirm", does the document get marked as "dirty", and you can then actually confirm the change in the multi-entity saving flow? What might that look like?

jameskoster commented 2 weeks ago

I'd assume, per the separate issue we have for this, that this menu item would also be available in the ⌘K command palette?

This is a bit of a tangent, but I'd expect to see this menu alongside shortcuts to other recently edited pages. We need better organisation in the command palette UI to achieve this. Here's an original mockup from way back:

Screenshot 2024-08-28 at 15 37 00

What happens when you press "Confirm"

That's a good question. The other actions in this menu are applied instantly, so I'd probably expect the same for this one.

jasmussen commented 2 weeks ago

The other actions in this menu are applied instantly, so I'd probably expect the same for this one.

Setting a homepage feels a bit like setting a site logo, which does not happen instantly. But perhaps the name can be different from "Confirm"?

jameskoster commented 2 weeks ago

Yup, it's not a strong feeling. I don't mind storing as a pending change.

But perhaps the name can be different from "Confirm"?

There is a growing tendency for the button label in such dialogs to echo the action. For instance in the "Move to trash" dialog the primary button is "Trash". Following that convention would give us something like "Set homepage" here, which seems a little long, but might work?

It would be good to define this detail more concretely in the systems work cc @mattrwalker.

mtias commented 1 week ago

While a bit hidden, it seems better than completely absent :)