Skip to content

feat(pds-avatar): expose an initials shadow part - #795

Merged
QuintonJason merged 2 commits into
mainfrom
feat/avatar-initials-part
Aug 14, 2026
Merged

feat(pds-avatar): expose an initials shadow part#795
QuintonJason merged 2 commits into
mainfrom
feat/avatar-initials-part

Conversation

@QuintonJason

@QuintonJason QuintonJason commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

Exposes an initials shadow part on pds-avatar so consumers can restyle the initials (e.g. color) via ::part(initials) instead of hijacking the internal --pine-color-brand custom property — which is the only lever available today.

/* before: the only way to recolor initials */
pds-avatar { --pine-color-brand: var(--pine-color-text-readonly); }

/* after */
pds-avatar::part(initials) { fill: var(--pine-color-text-readonly); }

Surfaced (again) building the Kajabi Clubs members roster, where per-entity/readonly initials needed a color the component doesn't expose. Implements DSS-228; sibling of the initials/background color gap (DSS-216).

No behavior change and no default restyle — the initials still default to --pine-color-brand; this only adds the part hook. components.d.ts is unaffected (shadow parts aren't part of the type surface); the readme's Shadow Parts table regenerates in CI.

Fixes DSS-228

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update (readme Shadow Parts — regenerated by CI)

How Has This Been Tested?

  • unit tests

Added a spec asserting pds-avatar[initials] renders an element with part="initials" (mirrors the existing part="status" test). Not built/run locally to avoid regenerating components.d.ts with a non-canonical toolchain — CI runs the canonical build + suite.

Test Configuration:

  • Pine versions: 3.29.0 (branch off main)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation (JSDoc @part; readme regenerates in CI)
  • I have added tests that prove my feature works
  • New and existing tests pass locally with my changes (deferred to CI — see above)
  • Design has QA'ed and approved this PR

Note

Low Risk
Additive styling hook only; no changes to rendering logic, defaults, or security-sensitive paths.

Overview
Adds an initials shadow part on pds-avatar so apps can restyle initials text (e.g. fill) via ::part(initials) instead of overriding --pine-color-brand.

The initials SVG gets part="initials" and JSDoc documents the part; unit snapshots and a new spec assert the part is present. No default visual or behavioral change.

Reviewed by Cursor Bugbot for commit 85083cb. Bugbot is set up for automated code reviews on this repo. Configure here.

@netlify

netlify Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview for pine-design-system ready!

Name Link
🔨 Latest commit 85083cb
🔍 Latest deploy log https://app.netlify.com/projects/pine-design-system/deploys/6a7e68b29d06ba0008aabc3f
😎 Deploy Preview https://deploy-preview-795--pine-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the package: core Changes have been made to the Core package label Aug 14, 2026
@QuintonJason
QuintonJason marked this pull request as ready for review August 14, 2026 00:58
@QuintonJason
QuintonJason requested a review from a team as a code owner August 14, 2026 00:58
@QuintonJason QuintonJason self-assigned this Aug 14, 2026

@pixelflips pixelflips 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.

LGTM! 👍🏼

@QuintonJason
QuintonJason merged commit fe4a93d into main Aug 14, 2026
30 of 33 checks passed
@QuintonJason
QuintonJason deleted the feat/avatar-initials-part branch August 14, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core Changes have been made to the Core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants