Skip to content

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

Merged
laurelfulford merged 5 commits into
trunkfrom
fix/social-icons-colour-setting-bleed
Jun 10, 2026
Merged

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

Conversation

@laurelfulford

@laurelfulford laurelfulford commented May 5, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

@adekbadek adekbadek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The bug fix itself is well-targeted and works end-to-end in the Site Editor — Article Subtitle and other unrelated blocks now show plain Text/Background labels, and the new in-block colour panel works as described, including the Brand-style hide/show.

One blocker before merge: removing the color supports from block.json without a deprecated registration is a silent-data-loss path for posts saved under the current shipped version.

A handful of polish items below — see the inline comments.

Comment thread src/blocks/author-profile-social/block.json
Comment thread src/blocks/author-profile-social/edit.jsx
Comment thread src/blocks/author-profile-social/class-author-profile-social-block.php Outdated
Comment thread src/blocks/author-profile-social/class-author-profile-social-block.php Outdated
@github-actions github-actions Bot added the [Status] Needs Changes or Feedback The issue or pull request needs action from the original creator label May 14, 2026
@laurelfulford

Copy link
Copy Markdown
Contributor Author

I think this is ready for your eyes again, @adekbadek, though it's just a comment addressing the blocker, not a code change.

If you have any hesitations about my "it'll be fiiiiiiiine" response there, let me know - there's no harm adding the deprecated code, I just wanted to avoid adding complexity if we can, but that shouldn't be at the expense of UX.

@laurelfulford laurelfulford requested a review from adekbadek May 26, 2026 23:15
@github-actions github-actions Bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed [Status] Needs Changes or Feedback The issue or pull request needs action from the original creator labels Jun 8, 2026
@laurelfulford

Copy link
Copy Markdown
Contributor Author

Thanks @adekbadek!

@laurelfulford laurelfulford merged commit befce8c into trunk Jun 10, 2026
13 checks passed
@laurelfulford laurelfulford deleted the fix/social-icons-colour-setting-bleed branch June 10, 2026 00:42
@github-actions

Copy link
Copy Markdown

Hey @laurelfulford, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Jun 17, 2026
# [6.43.0-alpha.2](v6.43.0-alpha.1...v6.43.0-alpha.2) (2026-06-17)

### Bug Fixes

* **audience:** decode HTML entities in campaign prompt titles ([#4711](#4711)) ([d22bd0f](d22bd0f))
* correct submit button text on change-payment-method page ([#4654](#4654)) ([15b230d](15b230d))
* **parse.ly:** update meta_type default ([#4724](#4724)) ([d5f4ea9](d5f4ea9))
* prevent content-gate editor.scss styles from getting chunked into the common.css file ([#4716](#4716)) ([4d4c557](4d4c557))
* **reader-activation:** exclude peeking newsletter from a11y tree ([#4744](#4744)) ([aba7794](aba7794))
* remove colour label changes to avoid bleeding into other blocks ([#4703](#4703)) ([befce8c](befce8c))
* **wc-memberships:** skip expiry filter for non-subscription memberships ([8769161](8769161))
* **web-preview:** right-align toolbar close button ([589248d](589248d))

### Features

* **admin:** companion to newspack-newsletters admin UX milestone ([#4735](#4735)) ([6d0566a](6d0566a))
* **block-theme:** add search overlay block ([#4729](#4729)) ([328f1ea](328f1ea))
* **integrations:** add inactive plugin state ([#4721](#4721)) ([f87a50f](f87a50f))
* **integrations:** add oauth and hidden field types ([#4639](#4639)) ([daafa6b](daafa6b))
* **integrations:** details modal and Run now for integration logs ([#4757](#4757)) ([db5ba79](db5ba79))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.43.0-alpha.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Approved The pull request has been reviewed and is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants