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

Site Editor: Export global style settings #27528

Closed
carolinan opened this issue Dec 5, 2020 · 10 comments · Fixed by #39048
Closed

Site Editor: Export global style settings #27528

carolinan opened this issue Dec 5, 2020 · 10 comments · Fixed by #39048
Assignees
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Status] In Progress Tracking issues with work in progress

Comments

@carolinan
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Global style settings are not included in the. zip file when I use the Export tool.

Describe the solution you'd like
If I create a design in the site editor, I want the changes I made in the global style settings (for example new color palettes) to be exported as a theme.json file when I use the Export tool, so that I can use my styles together with my exported templates.

@carolinan carolinan added the Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json label Dec 5, 2020
@carolinan carolinan added [Feature] Full Site Editing [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Feb 5, 2021
@aristath
Copy link
Member

aristath commented Feb 5, 2021

These should probably be exported alongside the template files that we already export.

@DaisyOlsen
Copy link
Contributor

This feels fairly important for getting theme developers onboard with building block themes. It feels like a disconnect that you can build out templates and templates-parts for export but not styles. I suspect that quite a lot of early block themes are going to end up with a lot of standard CSS until this is addressed.

@Sandstromer
Copy link

Is the general thinking here that templates and global styles will be exported as a "new theme" completely detached from the base theme, or will the export be a sort of design to work with the base theme that the user started with?

I can see potentially a use for both scenarios, where a user is creating for themselves or a client.

  1. a developer creating a bespoke theme
  2. a designer leveraging a current theme to use their bespoke design

@Sandstromer
Copy link

Sorry I went slightly off-topic here but to answer my own question, it seems that exports can be done both ways. The choice lies with the designer/developer.

When/if global styles, templates, and template parts are able to be exported in one package using the Site Editor export tool, this will be hugely helpful to theme devs.

If it is desired to use a design with the current theme, then templates, template parts, and global styles can be exported using the WP exporter, and then imported to another site quite easily.

@carolinan
Copy link
Contributor Author

Since the 5.8 release I have received a few questions about why the theme.json is missing from the export.

@anarieldesign
Copy link

Hi, this topic is soo important. I just asked @carolinan about this problem and she sent me a link to this ticket. We are thinking of switching our theme shop completely to an FSE theme with different demos but without this option to export Global Style settings it's not possible. I want to avoid using Customizer and child themes for fonts and colours and to be able to export settings from the Global Styles. Is there any chance we could have this in 5.9?

@anarieldesign
Copy link

anarieldesign commented Nov 16, 2021

This feels fairly important for getting theme developers onboard with building block themes. It feels like a disconnect that you can build out templates and templates-parts for export but not styles. I suspect that quite a lot of early block themes are going to end up with a lot of standard CSS until this is addressed.

Totally agree with @DaisyOlsen. We are working on a new FSE theme that will offer different demos and this option would be soo useful.

@annezazu
Copy link
Contributor

This came up in the eleventh call for testing for the FSE Outreach Program, which included a focus on Styles:

I miss a way to save my custom settings, I can “Reset to defaults”, but cannot save, and or/import/export them

@pbking
Copy link
Contributor

pbking commented Feb 24, 2022

This is an issue we have been using an experimental Theme Exporter plugin to try out. This is how we got a snapshot of the theme settings considering theme-provided and user-overriding values.

We were also considering the three states of the settings when we want the snapshot:

  • As a child of the current theme (when we want only the values the user has edited)
  • As a "standalone" theme (when we want the settings provided by the theme, it's parent and those provided by the user)
  • As a "grandchild" theme (where we want the settings provided by the CURRENT theme, though not it's parent, as well as the user-supplied values).

Which of those options are the default in the export .zip is important, as is a way to get that information independently of the export tool itself. The theme.json we need to craft varies on the situation.

The "standalone" option seems most reasonable for most situations though, especially as a way to "kick start" a theme.

@Mamaduka
Copy link
Member

Mamaduka commented Mar 1, 2022

Hi folks,

I create a new PR #39048 that's ready for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Status] In Progress Tracking issues with work in progress
Projects
None yet
8 participants