Skip to content

fix: remove colour label changes to avoid bleeding into other blocks#4703

Open
laurelfulford wants to merge 3 commits into
trunkfrom
fix/social-icons-colour-setting-bleed
Open

fix: remove colour label changes to avoid bleeding into other blocks#4703
laurelfulford wants to merge 3 commits into
trunkfrom
fix/social-icons-colour-setting-bleed

Conversation

@laurelfulford
Copy link
Copy Markdown
Contributor

@laurelfulford laurelfulford commented May 5, 2026

All Submissions:

Changes proposed in this Pull Request:

The Author Profile block's Social Links block includes some code that relabels the Color and Background colour pickers to Icon Color and Icon Background. This is having an unintended side effect and bleeding into other block settings.

This PR changes the approach to match how this is handled in Core's Social Links block, to (hopefully!) make it a little less fragile (the alternative seemed to be checking if the Author Profile social links block was active again and again, and adding/removing the label, but that seemed subpar).

Another option would be just to show the default 'Text' prefix. It's not as nice UX-wise, but much simpler under the hood. It doesn't match Core's Social Links block, but it matches the labelling in Core's new Icon block coming in WP 7.0.

Closes NPPD-1458

How to test the changes in this Pull Request:

  1. Using the Block Theme, edit one of the Single Post templates in the Site Editor (after resetting it if it has saved changes). These templates will already have the Author Profile block in place.
  2. In the site editor, click on any of the other blocks -- like the Post Title block -- and note the colour settings:
CleanShot 2026-05-05 at 14 37 06
  1. Apply this PR and run npm run build.
  2. Refresh the editor, and ensure standard blocks are no longer inheriting the 'Icon' prefix on the colour picker.
  3. Edit the Author Profile block and select the Social Icons block.
  4. Confirm the Colors panel shows up on the Style tab, under the Styles panel
  5. Ensure each colour has the prefix 'Icon'
  6. Try togglng the block between Default and Brand styles, and confirm that the colour pickers go away when "Brand" is picked, and appear again when "Default" is picked.
  7. Try changing the icon colours and saving - confirm colours can be changed and saved, and switching back to the Brand style switches back to the branded colours.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@laurelfulford laurelfulford requested a review from a team as a code owner May 5, 2026 21:40
@laurelfulford laurelfulford requested a review from Copilot May 5, 2026 21:40
@laurelfulford laurelfulford added the [Status] Needs Review The issue or pull request needs to be reviewed label May 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR narrows the editor-side color-panel relabeling logic for the Author Social Links block so the “Icon color / Icon background” overrides only run when that block is selected, instead of affecting unrelated block inspectors in the Site Editor.

Changes:

  • Adds isSelected to the Author Social Links edit component and gates the sidebar mutation effect on block selection.
  • Updates the effect dependencies so the relabel/hide behavior re-runs when selection state changes.
  • Documents the new prop and the intent of limiting the sidebar mutations to the active block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/blocks/author-profile-social/edit.jsx Outdated
@laurelfulford laurelfulford marked this pull request as draft May 5, 2026 21:55
@laurelfulford laurelfulford removed the [Status] Needs Review The issue or pull request needs to be reviewed label May 5, 2026
@laurelfulford laurelfulford changed the title fix: make colour label changes more contained to social links block fix: remove colour label changes to avoid bleeding into other blocks May 5, 2026
ker to match Core's Social Icons approach
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/blocks/author-profile-social/edit.jsx
@laurelfulford laurelfulford added the [Status] Needs Review The issue or pull request needs to be reviewed label May 5, 2026
@laurelfulford laurelfulford marked this pull request as ready for review May 5, 2026 23:17
@adekbadek adekbadek self-assigned this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Review The issue or pull request needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants