WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.18k forks source link

Selecting Text Color on a Group Block does nothing #21672

Closed maddisondesigns closed 4 years ago

maddisondesigns commented 4 years ago

Describe the bug Selecting the Text Color for a Group Block does nothing. Why does this option even exist? You can't add text straight into a Group Block. The only way to add text content into a Group Block is by adding another block such as a Heading Block or a Paragraph block, and when you do, those individual blocks control the colour of the text. It seems pointless having this option when it doesn't do anything. If you're going to keep the Text Color setting, then it needs to override the text colour on ALL the blocks contained within that Group, otherwise it should be removed.

Video: https://share.getcloudapp.com/jkulqXWd

To reproduce Steps to reproduce the behavior:

  1. Add Group Block
  2. Insert Paragraph Block into Group Block with some dummy content
  3. Reselect the Group Block
  4. Change Text Color on the Group Block
  5. See nothing change

Expected behaviour I would expect that by changing the text colour on a group block, all the text within that Group Block would change colour, but it doesn't because the text colour for the Blocks within a Group Block, are controlled by those individual Blocks.

Editor version (please complete the following information):

Desktop (please complete the following information):

jasmussen commented 4 years ago

Completely agree, if the text color option exists, it should work. However I can't reproduce the issue, in TwentyNineteen for me it works as it should do:

Screenshot 2020-04-17 at 10 59 30

This is admittedly running 5.4.1 alpha, and my TwentyNineteen version is version 1.5. The key difference from watching your video is that you appear to have the color palette that TwentyNineteen registers, which I suspect overrides the color styles that the editor allows you to set. What version of TwentyNineteen are you running?

maddisondesigns commented 4 years ago

@jasmussen It was using the latest version as of WP5.4 which was v1.5.

jasmussen commented 4 years ago

Indeed, I can reproduce this on the stable WordPress 5.4 running TwentyNineteen. It appears that TwentyNineteen sets a specific color regardless of custom text color, when one of the theme palette colors are chosen, which in turn overrides any custom color you set for text.

I also tested in TwentyTwenty and noted that this is not an issue. So I will create a trac ticket for fixing this in TwentyNineteen as it's not a block editor issue.

On a separate note, though, it appears the theme color palettes are not visible in master, neither for TwentyNineteen or TwentyTwenty. I suspect this is part of the ongoing global styles work, but CC: @nosolosw and @karmatosed in case you can confirm.

jasmussen commented 4 years ago

Created https://core.trac.wordpress.org/ticket/49931 to track this. Thanks for the ticket!

maddisondesigns commented 4 years ago

Thanks for creating that.

oandregal commented 4 years ago

On a separate note, though, it appears the theme color palettes are not visible in master, neither for TwentyNineteen or TwentyTwenty. I suspect this is part of the ongoing global styles work

Just checked master and it works well for me. I don't use the dev environment provided by Gutenberg, though. I've also tested using it (npx wp-env start) and it looks like I can't get the theme color palettes to show either. Not sure if it is the same issue, but, in the past, I've experienced something related.