Make WordPress Core

Opened 17 months ago

Closed 9 months ago

Last modified 9 months ago

#59802 closed defect (bug) (fixed)

Twenty Fifteen: Quote block citation text color does not change with block setting

Reported by: viralsampat's profile viralsampat Owned by: karmatosed's profile karmatosed
Milestone: 6.6 Priority: normal
Severity: normal Version: 6.3.2
Component: Bundled Theme Keywords: has-patch commit
Focuses: css Cc:

Description

Hello Team,

I have worked on the "Quote" block and found that its "Add Citation" text color is not changed when we try to set it from the block setting.

Here, I have attached its video.

Issue: https://share.cleanshot.com/c5VnwHz1Qt34NPXcHw9f

Thanks,

Attachments (5)

59802.patch (988 bytes) - added by viralsampat 16 months ago.
I have checked above mentioned issue and resolved it. Here, I have added my patch.
59802.diff (1.5 KB) - added by shailu25 10 months ago.
Patch Updated.
Krupa - before fix.png (96.4 KB) - added by krupajnanda 9 months ago.
Krupa - after fix.png (93.9 KB) - added by krupajnanda 9 months ago.
59802.2.patch (563 bytes) - added by shailu25 9 months ago.
Added patch

Download all attachments as: .zip

Change History (35)

@viralsampat
16 months ago

I have checked above mentioned issue and resolved it. Here, I have added my patch.

#1 @poena
11 months ago

  • Component changed from Themes to Bundled Theme

#2 @sabernhardt
10 months ago

  • Keywords changes-requested added; needs-patch dev-feedback removed
  • Milestone changed from Awaiting Review to Future Release
  • Summary changed from The quote block Add Citation text color issue into the theme Twenty Fifteen to Twenty Fifteen: Quote block citation text color does not change with block setting

Twenty Fifteen clearly defines the citation color as #333, and it needs to remain the default. The citation can inherit the color from the block only when that color is changed.

@shailu25
10 months ago

Patch Updated.

#3 @shailu25
10 months ago

  • Keywords has-patch added; changes-requested removed

Updated Patch as per suggested in above comment

  • Added color:inherit when color is selected/changed
  • If No Color is selected in backend then it will show default color #333 for Citation text.

#4 @karmatosed
10 months ago

  • Keywords needs-testing added
  • Milestone changed from Future Release to 6.6

Thank you for updating the patch. Let's now get some testing and see about getting this ready for commit. I am going to cautiously move this into the next release in preparation for that.

#5 @poena
10 months ago

Hi

I have retested 59802.diff on WordPress 6.6-alpha-57778-src.

The patch changes both the quote block and the pullquote block, but when I change the text color,
the quote block cite color is only changed on the front.

Is the change to the block quote intentional?

#6 @poena
10 months ago

  • Keywords changes-requested added

I'm sorry I got confused there for a bit!

This ticket is for the quote, so I figured that yes the changes to the quote is intentional.
The pullquote is not mentioned in this ticket, but it has the same problem, I see no harm in solving it here.

I suggest the following changes:
When a quote block is added, and the cite is enabled in the block toolbar, and the text color for the block is changed, then the cite should change color in both the editor and front.

In 59802.diff only the pullquote block has an update to the editor style. The quote block editor styles need to be updated.

#7 @poena
10 months ago

  • Keywords needs-testing removed

#8 @poena
10 months ago

To apply the diff, I needed to download the file and use git apply. I was not able to make the patch work using the grunt patch command. I am not sure if that is an error on my side.

This ticket was mentioned in PR #6702 on WordPress/wordpress-develop by @shailu25.


10 months ago
#9

#10 @shailu25
10 months ago

@poena Thanks for the feedback.

I have Updated Changes as per mentioned in above comment in Latest PR.

Latest PR: https://github.com/WordPress/wordpress-develop/pull/6702

#11 @shailu25
10 months ago

  • Keywords needs-testing added; changes-requested removed

#12 @shailu25
10 months ago

Reproduction Steps:

  1. Activate Twenty Fifteen Theme
  2. Select Quote Block & Add Text & Cite Text.
  3. Now Change Color, you will able to see Quote Cite Color is not working in Editor & Frontend Side

Testing Instructions:

Now Apply PR: https://github.com/WordPress/wordpress-develop/pull/6702

  1. Refresh Editor & Frontend Side After Applying PR.
  2. Now Change Quote Block Text Color in Editor
  3. Check Cite Text Color in Editor Side & Frontend Side.

Note: I have Added Color inherit When Text Color is selected in editor side. If there is no text color is selected in editor then it will show default color in editor & frontend Side.

Last edited 10 months ago by shailu25 (previous) (diff)

#13 @shailu25
10 months ago

@poena Can we Modify Ticket Title & Description?

Currently in Ticket Title & Description Only Mentioned for Quote Block. but we are fixing Cite Text Issue for both Quote & Pull Quote Block in this ticket.

Last edited 10 months ago by shailu25 (previous) (diff)

#14 @poena
10 months ago

  • Summary changed from Twenty Fifteen: Quote block citation text color does not change with block setting to Twenty Fifteen: Quote and Pullquote block citation text color does not change with block setting

#15 @shailu25
10 months ago

@poena we need to remove pullquote block in Ticket Title & Description again.(Sorry for this)

As @sabernhardt suggested to add pullquote block's all changes in separate ticket Ticket 59801

#16 @poena
10 months ago

  • Summary changed from Twenty Fifteen: Quote and Pullquote block citation text color does not change with block setting to Twenty Fifteen: Quote block citation text color does not change with block setting

#17 @poena
10 months ago

  • Keywords commit added

The updated PR works well. Adding the commit keyword.

#18 @krupajnanda
9 months ago

Test Report


Description

This report validates whether the indicated fix added in PR works as expected.

Patch PR: https://github.com/WordPress/wordpress-develop/pull/6702

Environment

  • WordPress: 6.6-beta1-58337-src
  • PHP: 8.2.15
  • Server: nginx/1.25.3
  • Database: mysqli (Server: 8.0.36 / Client: mysqlnd 8.2.15)
  • Browser: Chrome 125.0.0.0
  • OS: macOS
  • Theme: Twenty Fifteen 3.7
  • MU Plugins:
    • Safe Autoloaded Options Limit Test (MU Plugin) 1.0
  • Plugins:
    • Test Reports 1.1.0

Test Steps

  1. Checkout the code using below commad
    gh pr checkout 6702
    
  2. Open the Dashboard and activate the 2015 theme
  3. Create a new post
  4. Add the "Quote" block
  5. Add Citation text
  6. Change color of the text and save the changes
  7. Now, in the front end, observe that added changes for citation color is now resolved and you can see the color is applied to it.

Actual Results

  1. Issue resolved with given PR. ✅

Additional Notes

  • Before applying the PR the Citation text color was not reflected in the front end. After checking this PR out to my local, I see added changes are working as expeted.

Supplemental Artifacts

Added as Attachment

#19 @hmbashar
9 months ago

Test Report

Patch tested: #59802

Environment

  • WordPress: 6.6-alpha-57778-src
  • PHP: 8.3.7
  • Server: nginx/1.25.4
  • Database: mysqli (Server: 8.3.0 / Client: mysqlnd 8.3.7)
  • Browser: Chrome 125.0.0.0
  • OS: macOS
  • Theme: Twenty Fifteen 3.7
  • MU Plugins: None activated
  • Plugins:
    • FakerPress 0.6.6
    • Test Reports 1.1.0

Actual Results

  1. ✅ Issue resolved with patch.

Screenshots

Before Patch
https://i.ibb.co/G2rfvVM/Before-Patch.png

After Patch
https://i.ibb.co/VSGK1wb/After-Patch.png

#20 @rajinsharwar
9 months ago

Test Report

Patch tested: PR 6702

Environment

  • WordPress: 6.6-alpha-57778-src
  • PHP: 8.1.23
  • Server: nginx
  • Database: mysqli
  • Browser: Chrome
  • OS: Windows
  • Theme: Twenty Fifteen

Actual Results

  1. ✅ The issue is resolved with a patch.

Screenshots

Before Patch:-
In Post Editor: https://prnt.sc/Grrd5NnfCpiR
In Frontend: https://prnt.sc/NwT4wcaljsaN

After Patch
In Post Editor: https://prnt.sc/phq49_GnuBmz
In Frontend: https://prnt.sc/MO7KNwoJBMmP

#21 @karmatosed
9 months ago

  • Owner set to karmatosed
  • Resolution set to fixed
  • Status changed from new to closed

In 58368:

Twenty Fifteen: Fixes quote text color not changing with block setting.

The quote block citation text color wasn't changing through block settings. This resolves by using inherit.

Props viralsampat, poena, sabernhardt, shailu25, krupajnanda, hmbashar, rajinsharwar.
Fixes #59802.

#22 @karmatosed
9 months ago

Thank you everyone, this is now closed as committed.

#23 @shailu25
9 months ago

@karmatosed

I think you have committed old patch.

This PR is Latest PR : https://github.com/WordPress/wordpress-develop/pull/6702

#24 @karmatosed
9 months ago

@shailu25 correcting now - apologies about that it was rather hard to unpick the trail.

#25 @karmatosed
9 months ago

In 58370:

Twenty Fifteen: Fixes patch miss [58368].

The latest patch was missing so one inherit wasn't added. Bringing that in with this commit.

Props @shailu25.
See #59802.

#26 @shailu25
9 months ago

@karmatosed

In /src/wp-content/themes/twentyfifteen/css/blocks.css Line no 126 to 130 need to remove because its duplicated of Line 131 to 135.

I think you forgot to remove this in previous commit.

.wp-block-quote[class*="-text-color"] cite,
.wp-block-quote[style*="color"] cite {
	color: inherit;
}

@shailu25
9 months ago

Added patch

#27 @shailu25
9 months ago

@karmatosed Added patch for Duplicate code which need to remove.

#28 @mdnesarmridha
9 months ago

  • Keywords needs-testing removed

#29 @karmatosed
9 months ago

@shailu25 thank you for patch, I will now go ahead and add back in the final one.

#30 @karmatosed
9 months ago

In 58371:

Twenty Fifteen: Fixes patch miss [58370].

The latest patch was missing so one inherit wasn't added. Removes unused line.

Props @shailu25.
See #59802.

Note: See TracTickets for help on using tickets.