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

Update: Refactor ColorPalette by extracting its design #17154

Conversation

jorgefilipecosta
Copy link
Member

Description

This PR extracts the design from the ColorPalette component. So ColorPalette just contains the color-related functionality and CircularOptionPicker an internal component contains the UI to render a set of buttons as circles and a set of actions at the bottom.

We are implementing a set of Gradient presents #16662 (comment) so extracting this component allows us to use the same UI for the Gradient Presets without code repetition.

Missing updates to unit tests.

How has this been tested?

I checked that the color functionality still works exactly as before.

@jorgefilipecosta jorgefilipecosta added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Aug 22, 2019
@jorgefilipecosta jorgefilipecosta force-pushed the update/extact-circular-option-picker-internal-component-containing-color-palette-design branch 5 times, most recently from 4b698cf to ccb0f00 Compare August 30, 2019 13:10
@jorgefilipecosta jorgefilipecosta force-pushed the update/extact-circular-option-picker-internal-component-containing-color-palette-design branch from ccb0f00 to 89d00c5 Compare August 30, 2019 17:36
@jorgefilipecosta jorgefilipecosta force-pushed the update/extact-circular-option-picker-internal-component-containing-color-palette-design branch from 89d00c5 to 1c1ebd2 Compare September 19, 2019 20:03
@jorgefilipecosta jorgefilipecosta force-pushed the update/extact-circular-option-picker-internal-component-containing-color-palette-design branch from 1c1ebd2 to 72b8a23 Compare September 26, 2019 10:09
Copy link
Contributor

@draganescu draganescu left a comment

Choose a reason for hiding this comment

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

I have tested the changes and the seem to work with no problems introduced. Also the refactoring makes perfect sense for reutilisation of code.

@jorgefilipecosta jorgefilipecosta merged commit 81d09c4 into master Oct 2, 2019
@jorgefilipecosta
Copy link
Member Author

Thank you for the review @draganescu 👍

@youknowriad youknowriad deleted the update/extact-circular-option-picker-internal-component-containing-color-palette-design branch October 14, 2019 10:35
@youknowriad youknowriad added this to the Gutenberg 6.7 milestone Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants