create-block-theme icon indicating copy to clipboard operation
create-block-theme copied to clipboard

Add style variations to the Site Editor

Open scruffian opened this issue 3 years ago • 8 comments

This adds style variation creation to the Site Editor:

https://user-images.githubusercontent.com/275961/181806075-2aa918a8-88aa-4652-b52c-bce0d95b8620.mp4

This adds a new JS package that allows us to integrate this tool more deeply into the Gutenberg Site Editor.

The initial step is to add the creation of style variations, but in the future we should move across other tools.

To test you need to use this Gutenberg PR: https://github.com/WordPress/gutenberg/pull/42824

scruffian avatar Jul 29 '22 16:07 scruffian

I also added blank theme creation to the site editor:

Screenshot 2022-08-01 at 12 11 10

scruffian avatar Aug 01 '22 11:08 scruffian

@madhusudhand @pbking sorry I forgot to mention that you also need this associated Gutenberg PR: https://github.com/WordPress/gutenberg/pull/42824

scruffian avatar Aug 02 '22 14:08 scruffian

If Gutenberg is deactivated, the editor crashes when I click on the Create Block Theme panel, so perhaps a check should be added for whether to initialize this panel.

Yeah, definitely either need a check for capabilities or wait for that change to land in CORE to release this.

pbking avatar Aug 09 '22 20:08 pbking

Yeah, definitely either need a check for capabilities or wait for that change to land in CORE to release this.

Done in dfbc74f.

scruffian avatar Aug 11 '22 10:08 scruffian

Ah just as I green checked, I noticed one bug — when I try to save a variation with a space in its name, it 404s:

Screen Shot 2022-08-11 at 12 29 58 PM

jffng avatar Aug 11 '22 16:08 jffng

It's been a while, so I took the liberty to bring this up to date removing some code that was breaking due to changes in the App. I also refactored it to reflect how other parts of the Plugin behave within the Site Editor. If @scruffian has no objections, I'd be happy to dedicate a bit of time to this.

vcanales avatar Jul 20 '23 23:07 vcanales

I would love to see this wrap up and land. It was the inspiration and reference for other site editor changes but that never included variations! Would be keen to review or assist on wrapping this up.

pbking avatar Jul 21 '23 13:07 pbking

I'm happy for anyone to take this over.

scruffian avatar Aug 03 '23 11:08 scruffian

closing this in favour of #532

madhusudhand avatar Apr 04 '24 05:04 madhusudhand