Skip to content

Exported JSON loses 'appearanceTools' abstraction #39464

Closed

Description

@pbking

Description

When exporting the theme from the FSE the included theme.json is missing the appearanceTools attribute present in the theme's theme.json file and instead the attributes that abstracts are added instead.

Missing attribute present in original theme.json:
settings.appearanceTools

Among added attributes:
settings.color.custom
settings.color.customGradient
settings.color.link
settings.spacing.padding
settings.spacing.blockGap
settings.spacing.margin

I expect this is because the "appearanceTools" attribute is flipping all of those values "true" without the need to provide them. However it may be desirable to keep the original attribute in exported configuration so that if any additional attributes are enabled due to that value they are also included in the theme.

Step-by-step reproduction instructions

Activate a theme that defines settings.appearanceTools: true in the theme.json file.
Export that theme from the FSE using the hamburgerMenu>TOOLS>Export tool.
Compare the theme.json exported to the theme.json provided by the theme. Note that appearanceTools setting is absent while the values it represents are present.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Activity

  1. added
    [Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.
    [Type] BugAn existing feature does not function as intended
    on Mar 15, 2022
  2. scruffian commented on Mar 18, 2022

    @scruffian
    Contributor

    Fixed by #39590

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Package] Edit Site/packages/edit-site[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions