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

WP-Builder: Feat/colorPalette-implementation #9

Merged
merged 7 commits into from
Jul 3, 2023

Conversation

bangank36
Copy link
Owner

@bangank36 bangank36 commented Jul 2, 2023

Summary

  • Implement color pallete control with Gutenberg, { format: 'color' }
  • Note that the new optionIsNotEmpty method should move to new file when needed, it will expect a colors prop in options object to display a regular color picker ( implemented soon ) or a palette picker

Reference

@bangank36 bangank36 self-assigned this Jul 2, 2023
@bangank36 bangank36 added the enhancement New feature or request label Jul 2, 2023
Copy link
Owner Author

@bangank36 bangank36 left a comment

Choose a reason for hiding this comment

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

LGTM

scope: "#/properties/colorPaletteControl",
options: {
format: 'color',
colors:[
Copy link
Owner Author

Choose a reason for hiding this comment

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

options.colors is new option prop used for the new palette control

@@ -5,6 +5,9 @@ import ReactDOM from "react-dom";
// include your styles into the webpack bundle
import "../styles/index.css";

// include @wordpress/components styles
import '@wordpress/components/build-style/style.css';
Copy link
Owner Author

Choose a reason for hiding this comment

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

missing style leads to mismatch renderer

)
};

const optionIsNotEmpty =
Copy link
Owner Author

Choose a reason for hiding this comment

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

nit: should move this tester into seperate file, will come back later

@bangank36 bangank36 merged commit 64b4b59 into main Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant