-
Notifications
You must be signed in to change notification settings - Fork 4.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
Exporting Block Themes and Styles #27941
Comments
Post the 5.9 release, I feel this issue should be revisited. The ability to export Global Styles will be extremely useful in a FSE world. |
I agree 100% with @ndiego. I was preparing our theme shop to switch totally to FSE theme with different demos but without the ability to export and import Global Styles, this is going to be hard. I'll try to find some other way around it :). I thought it would be possible to export it like post, pages, templates but unfortunately is not the case. Thank you all for your hard work. |
@scruffian I like this a lot 🙌 |
This looks like a great start. I see two different users that would benefit from this. |
I made a first pass at this here: #39313 I'd love your feedback! |
Showing this in the context of the traditional Export screen makes me think of a couple scenarios:
Obviously, this gets a little complicated because we don't have a built-in import tool that would handle both theme and content at once. But I think it would make sense to figure this out at some point. Allowing folks to export their theme in tandem with their content would provide a pretty seamless migration tool for folks. |
@kjellr thanks, this is a really good direction. Do you think we also should have the "theme only" option too? The advantage of offering this in the Dashboard rather than the Site Editor is that it gives us a lot more ability to add additional controls and inputs (like Theme name, description etc) which might feel out of place in the Site Editor. Maybe we don't need it in the Site Editor at all? |
I rather think that "What comes out of the site editor" shouldn't need inputs, that is a good opportunity to export (or save) what you have. That feels like the logical progression of the existing export tooling in the FSE. If a workflow needs to provide metadata or other options or details then I do agree it belongs outside of the workflow of the FSE; the WP Admin seems more valid. However I'm not sure if that should be the purview of Gutenberg. At that point you aren't exporting a theme but creating a new one and there's a lot of opinion available there. |
I think this is probably a better mockup. It allows for this, and also follows the paradigm used by a few of the other radio buttons, where we surface additional options when the main radio button is selected: (It doesn't include a "Content but not the theme" option... so maybe it needs another radio button for that though). |
If we present this as an option to export the entire theme, does that set an expectation that uploading the resultant .zip via themes.php will work? (I don't know if this works or not, but assuming it doesn't). It seems plausible to me that there would be a way to export from:
|
It should work... |
I'm not sure the options here make sense - what if I want to just export my templates and styles but not the rest of the theme? |
My thought is that if you selected just one of the checkboxes, it would do that. But maybe it's weird to associate it with a theme if it's not technically exporting a "theme"? |
Very easily could be missing something but only seeing templates feels odd. I have a sense of wanting template parts too as a checkbox option. |
Unfortunately, the import/export (plugin) does not have a component maintainer. (And I like the idea of it being placed together with the existing export/imports, over keeping it in the site editor) |
In order for this to work we'd need to offer an option to include things like style.css and functions.php in the export. Which makes me wonder if there should be three radios;
Edit: Then again, if there's no way to import just templates or just styles, is there any point in allowing folks to export them independently? 🤔 |
I think so for theme developers - this could be a useful part of their workflow. |
Thanks for all this feedback. Here's a suggestion for how we might achieve the same thing from the site editor... #39202 |
Can we take this concept one step farther, and offer export of .wp-env.json? I'm exploring the developer experience from the start with wp-env using Docker. My goal is to get a portable "solution" for captains rather than a portable theme and a portable plugin. Let me explain what I mean by "solution". A full-bodied solution is not just a my plugin and my theme. It is a collection of the following:
At the moment, do I still need my own docker .yml file to iterate on a wholistic solution for captains? This is all kind of theoretical and I'm still exploring the whole experience. |
So, uh oh, I guess there are some serious concerns with the idea that I shared. Here is the feedback I received from slack.
I came to my suggestion naïve of the hostile reception it would receive with a pure motivation. I am sorry to have caused any disruption in the pursuit of a better development experience for WP developers. So, maybe disregard my idea ? |
I agree with the expressed concerns and think that the suggestion might be out of the scope of what the editor should do, but there's no disruption at all for making the suggestion? Please feel free to keep bringing ideas for discussion, that's how we make progress together! |
I appreciated this idea. Do you think we could gather support for developing a plugin that can offer the functionality? In the interest of inclusivity, I think the idea still may have merit. For devs coming from the JS world, the experience with VVV is really unfamiliar. In the interest of living up to the inclusivity we aim to achieve within the WP Community, I hope we can make the beginner experience great for developers with different 'first languages' - JS vs. PHP. Do you think there could be any benefit in having multiple 'golden' pathways? |
I think we close this in favour of #39189. Thoughts? |
The site editor currently has the ability to export the user's templates and template parts. The implementation, however, was put together just to allow easier flows during development and the initial days of sharing block themes. As things mature, we need to revise all the implications of exporting properly.
edit_theme_options
but it should be switched toexport
at the very least. We might want to consider a new capabilitydownload_theme
(to complement upload_themes) orexport_design
, particularly with the next point...The text was updated successfully, but these errors were encountered: