Skip to content

feat(author-profile-social): add support for colors, block spacing, brand style#4509

Open
thomasguillot wants to merge 54 commits intotrunkfrom
update/author-profile-social
Open

feat(author-profile-social): add support for colors, block spacing, brand style#4509
thomasguillot wants to merge 54 commits intotrunkfrom
update/author-profile-social

Conversation

@thomasguillot
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

This PR adds a bunch of enhancements to the block:

  • New style: "Brand" that inherits the brand's colours
  • If default style selected: User can control Icon and icon background colours (I used Core's Color panel instead of custom one because of ordering. I renamed "Text" and "Background" to "Icon color" and "Icon background" with some JS)
  • We now support block spacing
  • I removed the padding setting

We are extracting the gaps and colours to apply them to the actual link

video.mp4

How to test the changes in this Pull Request:

  1. Add an author profile block
  2. Edit the social links
  3. Switch to this branch and refresh
  4. You should see more settings in the sidebar.
  5. Test the colours
  6. The spacings (gap and margin)
  7. Test brand vs default

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?

rbcorrales and others added 30 commits February 5, 2026 00:30
@thomasguillot thomasguillot requested a review from a team as a code owner February 24, 2026 16:04
@thomasguillot thomasguillot added the [Status] Needs Review The issue or pull request needs to be reviewed label Feb 24, 2026
Copy link
Contributor

@laurelfulford laurelfulford left a comment

Choose a reason for hiding this comment

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

This is looking really cool, @thomasguillot!

I have a couple suggestions and some not-necessary nits. Just let me know if anything doesn't make sense, or doesn't line up with how it seems to work for you!

* @param string $value Raw value, e.g. "var:preset|spacing|20" or "#fff".
* @return string CSS value, e.g. "var(--wp--preset--spacing--20)" or "#fff".
*/
private static function preset_to_css( string $value ): string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at Core's Social Links block, it uses the <ul> as the outer wrapper, rather than an extra <div> that the author profile social block uses.

I think we can rejig it a bit so the <ul> is the outermost container, then the block gap stuff should just work without this workaround (cc @rbcorrales in case I am horribly wrong)! This looks like it works, but it'd be nice to take advantage of the baked in way to do it if we can 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One issue with this approach is that it would leave us with two separate versions of the block that use different structures: the legacy version built with <div><ul>, and the InnerBlocks version that uses only <ul>.

@github-actions github-actions bot added the [Status] Needs Changes or Feedback The issue or pull request needs action from the original creator label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Changes or Feedback The issue or pull request needs action from the original creator [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