Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single Page Editing: show different set of layouts in onboarding #43285

Closed
vindl opened this issue Jun 15, 2020 · 12 comments · Fixed by #43349
Closed

Single Page Editing: show different set of layouts in onboarding #43285

vindl opened this issue Jun 15, 2020 · 12 comments · Fixed by #43349

Comments

@vindl
Copy link
Member

vindl commented Jun 15, 2020

Based on the work in #43284 we should show a different set of layouts in the design selector that are based on Seedlet Blocks theme. Folks on View team will work on creating those, but until they are ready we can use mock layouts to test the functionality.

@vindl vindl changed the title Site Editor: show different set of layouts in onboarding Single Page Editing: show different set of layouts in onboarding Jun 15, 2020
@vindl
Copy link
Member Author

vindl commented Jun 15, 2020

I just learned from @ianstewart that the existing Layouts in Gutenboarding will work for single page site too. I think the only thing remaining here is to make sure that the previews still look right with Seedlet blocks theme and that it's activated for the site.

@ianstewart
Copy link
Contributor

ianstewart commented Jun 15, 2020

@allancole @kjellr or @jffng Any concerns about adding seedlet and seedlet blocks to our public theme directory? If we don't network activate it? It doesn't need to be any amount of finished. (As long as it doesn't produce fatal errors.) Just to see if we could start hooking it up for testing like the scenario above? (Seeing if it can be applied to a preview in Gutenboarding.)

@jffng
Copy link
Contributor

jffng commented Jun 15, 2020

Just merged seedlet + seedlet blocks to the a8c/themes repo:

Automattic/themes#2114
Automattic/themes#2115

Looking forward to see it used in this context, I'll be onboard to help fix issues.

@ianstewart
Copy link
Contributor

Step one done!

@allancole now that these are in the themes github repo … I can't recall if anything will break if these are moved to /pub in wpcom svn without network activating. Because I've never used GH to deploy themes on WP.com and it's been a while since I've hacked something in /pub. :)

@allancole
Copy link
Contributor

allancole commented Jun 15, 2020

I can't recall if anything will break if these are moved to /pub in wpcom svn without network activating.

No nothing should break in that scenario. Especially, if you’re testing these on a sandbox. I usually just deploy themes from GH to SVN manually to my sandbox and then deploy (or not) from there.

@ianstewart
Copy link
Contributor

image

It's available in /pub now thanks to @allancole. You'll need to use a non-showcase method to activate it. (Probably WP CLI.) And the core-site-editor-enabled sticker on a test site.

@noahtallen
Copy link
Contributor

I tested changing the config of one of the layout options to use seedlet-blocks as the theme.

Good news: it correctly activates the theme on the site!

A couple of oddities:

Layout preview in gutenboarding doesn't work. I assume this is related to the theme demo site

Screen Shot 2020-06-16 at 11 22 11 AM

The theme page for seedlet in calypso looks weird. you can see this by looking at the active theme on the site:

Screen Shot 2020-06-16 at 11 23 07 AM

@ianstewart
Copy link
Contributor

The theme page for seedlet in calypso looks weird. you can see this by looking at the active theme on the site:

This'll be true until we have someway of hiding this theme while it's network-activated. :) (It might be a bit too buggy to network-activate now.) Once we have that we can set up a demo site and theme showcase page and network activate with it only being shown for the subset of users we choose.

@noahtallen
Copy link
Contributor

sounds good!

@simison
Copy link
Member

simison commented Jun 18, 2020

@noahtallen in case it's helpful, this is how the API gets the demo URL for the template:

$theme_slug = 'pub/' . $theme_name; // We'll need to modify this if we want it to work for premium themes.
$demo_url = wpcom_get_theme_demo_site( $theme_slug );

In class-wpcom-json-api-template-demo-endpoint.php

@noahtallen
Copy link
Contributor

Thanks! I dug into that code a few days ago. It works correctly, but fails at the point where it takes the DOM of the demo site and changes the post content. (It fails because FSE on the demo site isn't rendering post content correctly, which will be fixed by the FSE plugin sync, which turns off FSE demo templates)

@noahtallen
Copy link
Contributor

Or at least, that's my working understanding of the problem, which might change after I test it again today :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants