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

[Block] Comment Template color adjustment -> Overrides inner child color adjustments #40255

Closed
paaljoachim opened this issue Apr 12, 2022 · 11 comments
Labels
[Block] Columns Affects the Columns Block [Block] Comment Template Affects the Comment Template Block Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended

Comments

@paaljoachim
Copy link
Contributor

paaljoachim commented Apr 12, 2022

I have edited this issue. 26 July 2022

Description

Examples
Comments > Comment Template > Columns > Column > Row > Comment Date and Comment Author. Change the link color of each.

Comment Template. Change the Link color and notice that it also affects the inner blocks where the color has already been adjusted.

Step-by-step reproduction instructions

  1. Add the Comments Query Loop block.
  2. In Comments > Comment Template > Columns > Column > Row > Comment Date change the link color.
  3. In Comments > Comment Template > Columns > Column > Comment Author Name change the link color.
  4. Go to Comments. Change the link color and notice it changes all the links also the Comment Date and Comment Author Name even though these are defined in their own blocks.

Screenshots, screen recording, code snippet

Changing the Comment Date link color.
Screenshot 2022-07-26 at 08 37 54

Changing the parent Comment link color also affects inner child blocks.
Screenshot 2022-07-26 at 08 38 12

Environment info

WP 6.0.1
Gutenberg plugin 13.7.2
Twenty Twenty Two
Chrome

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@paaljoachim paaljoachim added [Type] Bug An existing feature does not function as intended [Block] Columns Affects the Columns Block [Block] Comment Template Affects the Comment Template Block labels Apr 12, 2022
@paaljoachim paaljoachim added the Needs Testing Needs further testing to be confirmed. label Apr 12, 2022
@carolinan
Copy link
Contributor

The edit link and comment reply link are always links and their color is changed by the link color option, not the text color option.

I do see a related issue:

Editor
When I change the link color of the comments query loop, the color of the edit link and the reply link inherit this color, even if they already specify their own link color in their own block setting.

Front
The edit and reply link uses the correct, individually assigned colors.

@paaljoachim paaljoachim changed the title [Block] Comment Template -> Columns - change text colors does not affect Edit and Reply text [Block] Comment Template color adjustment -> Overrides inner child color adjustments Jul 26, 2022
@paaljoachim
Copy link
Contributor Author

I have gone ahead and edited the issue title and the issue content to reflect that changing color of the parent block Comments will also change inner blocks that have already defined inner colors.

@paaljoachim
Copy link
Contributor Author

Hey @michalczaplinski
This might be an issue for you to take a closer look at.

@michalczaplinski michalczaplinski added Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts and removed Needs Testing Needs further testing to be confirmed. labels Jul 26, 2022
@michalczaplinski
Copy link
Contributor

michalczaplinski commented Jul 26, 2022

After taking a quick look I can indeed confirm the issue @paaljoachim

If you'd like to send a PR with a fix that would be awesome. I would be very happy to help 🙂

As mentioned by @carolinan, the issue is only present in the editor:

2022-07-26_18-11-46.mp4

@paaljoachim
Copy link
Contributor Author

Thanks for going through @michalczaplinski

I am wondering if the fix would be a general fix for all parent blocks that affects the inner blocks that have already been modified and should not be overwritten by changes the parent block makes.

Hopefully a developer will show up that can fix the issue.
I will also ping Carlos @c4rl0sbr4v0

@michalczaplinski
Copy link
Contributor

I dig a little more here and the same issue appears in the Query Loop block. There are 2 twists though:

  1. The correct styles are applied after reloading the editor page:
2022-07-28_17-11-11.mp4
  1. The editor is sensitive to the temporal order in which the styles are applied.
  • If we first change the styles of the child (e.g. Comment Date block) and then the styles of the parent (e.g. Comment block) the parent styles win, which is incorrect.
  • If we first change the styles of the parent and then the styles of the child, the styles are applied correctly.
2022-07-28_17-13-31.mp4

@michalczaplinski
Copy link
Contributor

Hi @oandregal 👋 I have a question

In this comment you mention that:

Applying the link color is not deterministic in the editor. If I apply the link color to the paragraph and then to the group, the link color is the one set by the group. If I do it the other way around, the link color is the one set by the paragraph.

This is precisely the problem that we see in the current issue. Do you know if this behaviour is intentional or can be considered a bug?

@paaljoachim
Copy link
Contributor Author

Heya Nik @ntsekouras I believe this is an issue you might want to know about as well.

@ntsekouras
Copy link
Contributor

👋 - It's not specific to Query Loop or Comments Loop. It's related to color support in general. You can reproduce with just a Group block. Actually the main issue is the one @michalczaplinski linked: #37582 and probably other supports have this..

I think this can be closed as duplicate. What do you think?

@paaljoachim
Copy link
Contributor Author

Yeah. It looks like this is a duplicate issue and can be closed. I will let Michael decide.

@michalczaplinski
Copy link
Contributor

Indeed, let's close this one in favour of #37582 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Columns Affects the Columns Block [Block] Comment Template Affects the Comment Template Block Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants