WordPress / gutenberg

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

Block Theme Previews: add option to switch between different themes to preview #50918

Open annezazu opened 1 year ago

annezazu commented 1 year ago

This was raised by @carolinan as part of the FSE Outreach Program's Rapid Revamp call for testing:

Once I clicked on the Live Preview link and entered the Site Editor with the Navigation Sidebar (the dark grey menu area) on the left, I was expecting to be able to navigate between all the installed block themes and WordPress.org block themes, similar to how the preview of classic themes work.

Here's the experience with classic themes to imagine for block themes in the Site Editor previewing mechanism:

https://github.com/WordPress/gutenberg/assets/26996883/aa68766a-a3b9-4711-a03e-0e0be19cc3fb

I remember seeing some designs floating around that considered this. cc @WordPress/gutenberg-design just in case!

annezazu commented 1 year ago

Huzzah, found the design showing access to block themes from the Design section.

237068191-90aff2c6-ad59-4359-83c6-7a8f22f6c72d

Worth reusing here :)

jasmussen commented 1 year ago

I think @jameskoster has a separate issue for the "meta links" in the save hub, and has a newer design for themes access.

jameskoster commented 1 year ago

and has a newer design for themes access

This one:

Screenshot 2023-05-25 at 14 25 01

Perhaps there's a way for that element to accommodate inline theme switching, rather than sending folks off to the legacy themes grid in wp-admin?

Theme

The theme switch can be expressed in the save modal:

Screenshot 2023-05-25 at 14 49 03

The trade-off with this approach is that it would only be able to handle block themes.

richtabor commented 1 year ago

Perhaps there's a way for that element to accommodate inline theme switching, rather than sending folks off to the legacy themes grid in wp-admin?

I don't think it's particularly useful without visuals representing the themes (like classic has). Seems a bit too forward-facing too to have theme switching accessible from the main SE navigation. I think a "Browse themes" link would work fine until a future where there is theme switching (including partial theme switching) in the SE.

scruffian commented 1 year ago

It's technically very easy to do: https://github.com/WordPress/gutenberg/pull/50388

jameskoster commented 1 year ago

I think a "Browse themes" link would work fine until a future where there is theme switching (including partial theme switching) in the SE.

I agree this would be a satisfactory bare minimum.

But it would be nice to have quick switching while previewing a theme. It's currently a very tedious process (see the video in Ben's PR).