Repository navigation
Conversation
|
Size Change: +61.2 kB (6%) 🔍 Total Size: 877 kB
ℹ️ View Unchanged
|
| */ | ||
| import getBaseThemeZip from './get-base-theme-zip'; | ||
|
|
||
| export default function ThemeExporter( { ids, templatePartIds } ) { |
There was a problem hiding this comment.
We should probably allow this to be disabled somehow and account for permissions.
There was a problem hiding this comment.
disabled somehow
Through the editor settings, bootstrapped on the server? So that it can be both filtered and toggled with a store action?
account for permissions
Shouldn't anyone who can edit templates also be able to export them?
|
the bundle size increase here is not small. I believe this is better served by an export on the server instead of a JS based export. |
|
Agreed, I'll move it to the server once #21959 lands. |
|
Some more (potentially relevant) changes here: #21980 😅 |
|
@epiqueras why does it need a base theme to be set up? |
|
Are you talking about https://github.com/WordPress/gutenberg/blob/0426dd2d20357cfecb1d326961e71d619a276010/packages/edit-site/src/components/header/theme-exporter/get-base-theme-zip/content.js? For all the content a theme ZIP file needs besides the templates. E.g., the entry PHP file. |
|
Yes, I don't think we should include anything there (no style css, no theme supports until we can support theme.json, etc) yet. |
👍 |
|
One thing that came up when discussing this in the |
|
I tried to test this but am receiving errors: wp db reset --yes go to gutenberg settings > enable Full Site Editing > save When visiting the base_url/home of my website, I receive: while johannes is being used: When i visit: http://my.site/wp-admin/admin.php?page=gutenberg-edit-site ; I receive the same error uncaught argumentcounterror as above. |
|
Try enabling the demo block templates experiment. |
|
nope, a similar issue:
|
|
@skorasaurus Are you sure you're testing this branch? At the time of the most recent commit here, |
|
Was once I ran a couple git clean commands and |
0426dd2 to
32af450
Compare
|
Closed in favor of #22922, which creates the ZIP file on the server to avoid the bundle size increase. |
Closes #19260
Description
This PR adds a theme exporter button to the site editor header's "More" dropdown.
The exporter uses @melchoyce's Johannes theme as the base for the theme zip file and adds the site editor's templates and template parts.
How to test this?
Try exporting templates/parts with different modifications and verify that the exported files match what you have on the editor.
Screenshots
Types of Changes
New Feature: The site editor now has a theme exporter button for exporting customized templates and template parts in a theme zip file.
Checklist: