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

Add color options to heading block. #15625

Merged
merged 1 commit into from May 21, 2019

Conversation

@jorgefilipecosta
Copy link
Member

commented May 14, 2019

Description

Closes: #6012

This PR adds the color options available in the Paragraph and button block to the heading block.

How has this been tested?

I verified the color options in the heading block work as expected.

@mapk

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

I tested this and it worked great! :shipit:

heading-color

Let's merge this, but keep in mind that we may want to reevaluate the background color options for all these text blocks and just use the Group block to provide that.

@jorgefilipecosta jorgefilipecosta force-pushed the add/color-options-to-heading-block branch from e81c6b9 to 6e916e3 May 15, 2019

@youknowriad

This comment has been minimized.

Copy link
Contributor

commented May 16, 2019

But keep in mind that we may want to reevaluate the background color options for all these text blocks

Do we have a decision here, because I'd rather not introduce something that is going to be removed (it's always hard to remove things when they become APIs)

@mapk

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

Do we have a decision here?

Yes, we're going to keep this in. A decision is made to keep background color on most (if not all) text blocks. #8171 (comment)

Let's merge it.

@youknowriad
Copy link
Contributor

left a comment

We could use an e2e test.

I wonder how much of this code could be reused across blocks.

@jorgefilipecosta jorgefilipecosta merged commit 22ab406 into master May 21, 2019

1 check passed

Travis CI - Pull Request Build Passed
Details

@jorgefilipecosta jorgefilipecosta deleted the add/color-options-to-heading-block branch May 21, 2019

@jorgefilipecosta

This comment has been minimized.

Copy link
Member Author

commented May 21, 2019

Thank you for the reviews @youknowriad, @mapk 👍

We could use an e2e test.

I will follow up with an end 2 end test for this functionality.

I wonder how much of this code could be reused across blocks.

We already have a big amount of code reusability, by using shared components for the UI, withColors for the logic, and shared functions. But I agree it is something we could try to improve further. The main decision we would need to do would be the way this reusability would work, the simplest option would be a supports flag for color, but in previous discussions, there was no clear agreement if we should continue investing in support options.

@youknowriad youknowriad added this to the 5.8 (Gutenberg) milestone May 24, 2019

jorgefilipecosta added a commit that referenced this pull request May 24, 2019

jorgefilipecosta added a commit that referenced this pull request May 24, 2019

@BinaryMoon

This comment has been minimized.

Copy link

commented May 25, 2019

We really need this for all block controls (lists, paragraphs etc). Anything that can be used on a group block with a coloured background could cause readability issues and so the text colour will need to be changeable.

@mapk

This comment has been minimized.

Copy link
Contributor

commented May 28, 2019

That's the next step here, @BinaryMoon. We want to add text color options to all text blocks.

@justintadlock

This comment has been minimized.

Copy link

commented May 29, 2019

The .has-text-color class is missing. It only shows the .has-xxx-color class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.