create-block-theme
                                
                                
                                
                                    create-block-theme copied to clipboard
                            
                            
                            
                        Add style variations to the Site Editor
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
I also added blank theme creation to the site editor:
                                    
                                    
                                    
                                
@madhusudhand @pbking sorry I forgot to mention that you also need this associated Gutenberg PR: https://github.com/WordPress/gutenberg/pull/42824
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.
Yeah, definitely either need a check for capabilities or wait for that change to land in CORE to release this.
Done in dfbc74f.
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:
                                    
                                    
                                    
                                
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.
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.
I'm happy for anyone to take this over.
closing this in favour of #532