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

Refactor Default Colors and the ColorPalette component #4755

Merged
merged 2 commits into from
Feb 2, 2018

Conversation

youknowriad
Copy link
Contributor

Tiny PR that does two things related to colors:

  • Moves the default colors to the frontend making the Editor script more reusable without the need of the server-side bootstraping.

  • Small fix the ColorPalette component to accommodate the empty colors use-case. (Avoid JS errors)

Testing instructions

  • Open Gutenberg
  • Create a paragraph
  • Assign colors

@youknowriad youknowriad self-assigned this Jan 30, 2018
@@ -32,6 +32,20 @@ import store from '../../store';
*/
const DEFAULT_SETTINGS = {
alignWide: false,
blockTypes: true,
Copy link
Contributor Author

@youknowriad youknowriad Jan 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, this ensures all blocks are available by default.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #4707. Includes a comment in that PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just merged, so let's drop the change here.

aduth
aduth previously requested changes Jan 30, 2018
@@ -32,6 +32,20 @@ import store from '../../store';
*/
const DEFAULT_SETTINGS = {
alignWide: false,
blockTypes: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just merged, so let's drop the change here.

@youknowriad youknowriad dismissed aduth’s stale review January 31, 2018 09:14

Rebased and removed the duplicate key. Thanks

@youknowriad youknowriad merged commit c09407a into master Feb 2, 2018
@youknowriad youknowriad deleted the refactor/colors branch February 2, 2018 08:00
@aduth
Copy link
Member

aduth commented Feb 8, 2018

Moves the default colors to the frontend making the Editor script more reusable without the need of the server-side bootstrapping.

How will we plan to allow plugins to filter this? Or would this need to occur in the client?

@youknowriad
Copy link
Contributor Author

@aduth Why would we allow plugins to filter this? I mean we can still allow a filter on the frontend but we already have a theme support config to override these colors.

@aduth
Copy link
Member

aduth commented Feb 8, 2018

The override is a full replacement though, yeah? Maybe not a common use case, but doesn't seem simple as-is for a theme to add a new value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants