fix: remove colour label changes to avoid bleeding into other blocks#4703
Open
laurelfulford wants to merge 3 commits into
Open
fix: remove colour label changes to avoid bleeding into other blocks#4703laurelfulford wants to merge 3 commits into
laurelfulford wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
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
isSelectedto 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.
ker to match Core's Social Icons approach
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
npm run build.Other information: