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

Block Editor: Improve sharing setting for features between the client and server #22658

Closed
gziolo opened this issue May 27, 2020 · 2 comments
Closed
Labels
[Package] Block editor /packages/block-editor [Type] Code Quality Issues or PRs that relate to code quality

Comments

@gziolo
Copy link
Member

gziolo commented May 27, 2020

Description

Proposed in #22291 (review) by @nosolosw:

See how we can consolidate lib/experimental-default-theme.json and block-editor/src/store/defaults.js.

There is some duplications between:

https://github.com/WordPress/gutenberg/blob/c31475afc9fc149262da67c7464d5f4a527eb93a/lib/experimental-default-theme.json

and

https://github.com/WordPress/gutenberg/blob/c31475afc9fc149262da67c7464d5f4a527eb93a/packages/block-editor/src/store/defaults.js

The concerning part is how we source default values in the block editor on the client. We literally duplicate the same settings that exist on the server. It's hard to tell if they are still in sync.

If we decide to use JSON format for the default global settings on the server, we could as well find a way to source them from the same file.

@gziolo gziolo added [Package] Block editor /packages/block-editor [Type] Code Quality Issues or PRs that relate to code quality labels May 27, 2020
@gziolo
Copy link
Member Author

gziolo commented Oct 26, 2020

@nosolosw – is it something that is already resolved and thus can be closed?

@oandregal
Copy link
Member

At the moment, we still duplicate the values because the server part won't be part of 5.6, hence the block-editor needs that data. Let's revisit for 5.7.

@gziolo gziolo closed this as completed Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

No branches or pull requests

2 participants