-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Gutenboarding: Display FSE design using seedlet-blocks #43349
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~171 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
What do you think about overriding this at here:
And using script to generate new thumbnails with Seedlet theme: Thumbnail filenames contain theme name so you won't end up overriding existing ones. That way everything should fall into place nicely, including site creation with correct theme. You'll need theme demo site for the preview mechanism to work tho! |
I definitely like that idea! I think theme demo site is the missing part. if that is available, will it work for template API and for mshots? |
Yep! |
@ianstewart Can you help us set up a demo site for seedlets-blocks? |
done. I copied the existing design file and changed the theme property to |
Does it need to 1) involve the showcase in any way? Or 2) does it just need to be any site on WP.com with any theme that has Headstart annotations. If it's number one … we might need a way to hide the theme from non-automatticians since it's not ready for launch. If it's number two … for sure. |
@ianstewart I don't know... it needs to work for Gutenboarding. So with mshots and the template API. The theme activates correctly via the API already :) The only time the showcase appears to be broken right now is if the theme is already active on the site (because its preview image doesn't show up)
This sounds true? I'm not sure what this distinction is. |
I set up a temporary demo site and generated temporary Headstart annotations as well. https://seedletblocksdemo.wordpress.com/ The front-end doesn't look as expected currently but I believe that's just a known issue with our demo templates in the site editor on WP.com. |
TODO: integrate with changes in #42354 |
You might get there first :P |
The problem with previews in this PR is related to two issues: The seedlet demo site has some kind of template issue and doesn't render a static homepage. To fix:
Additionally, it seems that the seedlet blocks theme is not using gutenboarding headstart content or whatever shenanigans occur there, so all the content is started in classic editor content mode 🕺 |
it looks so close! :D |
Looking at the seedletblocksdemo site, it appears seedlet blocks is its own theme. I suspect that there are no headstart annotation for headstart to use so it's using some old fallback. (?) You could try tricking headstart into using a different annotation by passing it a vertical slug. I haven't tested it, but I'm talking about making it use |
I think @ianstewart was able to fix this! 💙 |
Yep. I made and deployed one. If anyone runs into an issue just ping me in Slack or here. I'm familiar enough with Headstart commands to make updates quickly. |
btw, generating working FSE design previews is blocked on #43415 |
d456c3c
to
817e448
Compare
Thanks! This is great!
I ❤️ this in particular -- your choice to use site options is much better (as it preserves other Gutenboarding-specific customizations) than mine was.
I'm a bit skeptical about this -- IIUC, it will also require re-running the thumbnails generation script? I think that's easy to miss -- I'd rather make the available designs JSON the complete source of truth; for a given available designs JSON (and no changes to the designs themselves), running the generator script should reproducibly yield the same result. If we want seedlet-based themes, we'll need to add them to the JSON -- I think that's a valid requirement. |
(The level of indirection and number of wrapped generator scripts is IMO a symptom of this.) |
Though I do agree with you about the level of indirection, I think it practically works:
Ah I see what you mean. I fixed this issue in, c5f3f2d. So the generation script will work with all possible design options. Anyways, the motivation for this is that if you have the flag set, you'll end up with a site editor, but no block based theme and no demo templates. So in that scenario, I think you'll have a broken site. We could get rid of the flag? 😅 |
Oh, okay, that rationale was lost on me. Well could we hide the non-block based themes if the flag is set? |
c5f3f2d
to
f9f2972
Compare
Based on this, I've changed it so that enabling the flag filters the designs to be only the FSE ones. The FSE designs still show up normal horizon/wpcalypso, but the flag just removes the other ones. That way, any option the user chooses with the flag set will get them to an FSE site. |
Thanks a lot for the latest round of changes that removed the Code-wise, this is looking great now. One more question, can we remove some of the regenerated thumbnails that are part of this PR? I assume we only need the |
sure :) |
8fb6f9a
to
4cd4e98
Compare
done. |
Yes, that's intentional :) We can change that behavior if we want to. Note that these designs are also "alpha" which means they won't show up on prod ;) |
I'm walking back on this now. Since the site editor isn't totally usable right now due to a bug in Gutenberg (the wrong template is used for the homepage in the editor), I'm fine hiding a way into that flow by default for the time being. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this and it works well! Awesome stuff!
Both creation flows worked as expected (with and without the flag). And now that the flag is required the designs do not show up without it.
Feel free to continue improving this flow if needed :) Props to the gutenboarding team for making it so easy to work with! |
This resolves #43288, since you will be able to activate seedlet-blocks internally via Gutenboarding in staging environments. This also resolves #43285, which adds a design which when chosen, will activate FSE on the new site.
This diff is the companion on wpcom and has already been deployed: D45075-code.
Changes proposed in this Pull Request
is_fse
flag andseedlet-blocks
theme to a designenabled_fse
option to create the site. This way, the backend still considers the ultimate flow to be gutenboarding. (see code-D45075 as well.)gutenboarding/site-editor
flag is set, convert every design to useis_fse
andseedlet-blocks
as the theme.This is currently blocked on #43415, which needs deployed so that the seedlet demo site begins working again. Once that is working, we can correctly generate previews. Currently previews do not work because the demo site does not render a post content block:(Previews are now working.)Second, we need the(This has been completed.)is_edge
config option in #42354 to restrict the design to certain environents. Otherwise this will start working in prod.Known issues:
seedlet-blocks
theme.Testing instructions
http://calypso.localhost:3000/new
gutenberg-edge
sticker is applied to your site.Ålso test: