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

Edit Site: Export all templates from wp_templates #19260

Closed
mtias opened this issue Dec 19, 2019 · 12 comments · Fixed by #22922
Closed

Edit Site: Export all templates from wp_templates #19260

mtias opened this issue Dec 19, 2019 · 12 comments · Fixed by #22922
Assignees
Labels
Needs Design Needs design efforts. [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Status] In Progress Tracking issues with work in progress

Comments

@mtias
Copy link
Member

mtias commented Dec 19, 2019

There should be a way to export all templates defined in wp_templates as a theme package. Considerations should include whether it should use the current theme files if there is no matching user defined template.

This could start as an advanced tool in the actual templates CPT (similar to exporting reusable blocks) or within the editor ellipsis menu settings.

@epiqueras
Copy link
Contributor

I made an exporter using @melchoyce 's Johannes theme as a template.

https://youtu.be/lT3qU0Wx0uU

Gutenberg Edit Site Theme Exporter Demo

@mtias
Copy link
Member Author

mtias commented Jan 7, 2020

Nice, I think we should add this as an ellipsis-menu tool in the top right of the header.

@epiqueras
Copy link
Contributor

Done 😄

Screen Shot 2020-01-07 at 12 55 36 PM

@jasmussen
Copy link
Contributor

Nice!

Can it be a vertical ellipsis though, to match the one from the post editor?

Screenshot 2020-01-07 at 19 12 21

@pablohoneyhoney
Copy link

If I'm not mistaken, on these circumstances the user is downloading as a theme her/his own design settings. If so, the copy could be more precise saying: Export as a theme, Package as a theme or Download as a theme.

@epiqueras
Copy link
Contributor

Can it be a vertical ellipsis though, to match the one from the post editor?

Done.

If so, the copy could be more precise saying: Export as a theme

Updated.

@mintplugins
Copy link

@epiqueras Is there already a related PR for this, or is this just a visual demo at this point?

@epiqueras
Copy link
Contributor

epiqueras commented Feb 12, 2020 via email

@karmatosed karmatosed added the [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later label Apr 6, 2020
@skorasaurus
Copy link
Member

skorasaurus commented Apr 9, 2020

I'm a little curious why this is marked as low.

I had been wondering why there haven't been many examples of people sharing FSE themes just yet and this one reason why. I was also going to make a ticket because I had create my first template with the FSE but then couldn't find it in my theme's folder...

To quickly experiment with other developers' themes, share my own theme creations and templates, and use version control on them, theme templates need to be exportable and strongly prefer the resultant HTML files to be able to be synced with the theme as it in browser (which is possible now if you're working with a php theme; make edits to the file; save it inside the theme's directory of an active WordPress installation (if it's not already there), and view your changes.

Enabling the export (and import) of templates to HTML (or any file other based format) that developers can easily share, distribute, and manage is important.

@carolinan
Copy link
Contributor

carolinan commented Apr 29, 2020

I am very torn about this.
Do I look forward to using this as a way to create and package new themes? Sure.

But it does not belong in Gutenberg. It does not belong in core. It belongs as a separate plugin, like a child theme generator.

Yes, it is a feature that helps people make very small changes and save something as a new theme.
But it is just as much a feature that invites abuse of commercial products, copyrights, and licenses, that can not be prevented.

It is not the developers that are going to be sharing these files, it is the people who are trying to take advantage of the designer and developers, beyond what is fair according to GPL.
We are already battling a never ending stream of themes that are being copied and spread under new names, new fake authors and new fake copyrights with bad intent.

@mtias
Copy link
Member Author

mtias commented Apr 29, 2020

@carolinan that's a fair point. I'd add that including it in Gutenberg (the plugin) shouldn't mean eventually launching it in core. Right now it's useful for developers as they get to test and play with block themes.

@mtias
Copy link
Member Author

mtias commented Apr 29, 2020

Also, I think if it's ever considered for core inclusion it should likely be part of Tools -> Export.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Needs design efforts. [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Status] In Progress Tracking issues with work in progress
Projects
None yet
8 participants