Skip to content

chore: Internal style v2 for 3 components - #185

Open
pan-kot wants to merge 2 commits into
mainfrom
chore-style-api-v2-avatar-bubble-support-prompt
Open

pan-kot wants to merge 2 commits into
mainfrom
chore-style-api-v2-avatar-bubble-support-prompt

Conversation

@pan-kot

@pan-kot pan-kot commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Description

New APIs are reflected in the tracker: P3d34KdbCd6o.

The visual regressions fail due to box-sizing: border-box; added to avatar content: it makes avatars with thick borders size properly - affecting the look of the v1 styling page (for the better).

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.26%. Comparing base (cd58936) to head (273594e).

❌ Your project check has failed because the head coverage (88.26%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #185      +/-   ##
==========================================
+ Coverage   88.16%   88.26%   +0.09%     
==========================================
  Files          25       25              
  Lines         355      358       +3     
  Branches      101      101              
==========================================
+ Hits          313      316       +3     
  Misses         42       42              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Package exports remain unresolved, and the shared Sass pipeline and avatar geometry changes need cross-theme build and visual validation.

1 open issue
What changed in this PR

Introduces internal Style API v2 support for Avatar, ChatBubble, and SupportPromptGroup, with reusable Sass helpers and development examples.

Changes:

  • Adds styling slots and configurable border and focus-ring styles.
  • Generates Sass mixins and style documentation during compilation.
  • Adds slot tests, generated-output snapshots, and demonstration pages.
File Description
src/​support-prompt-group/​styles.scss Registers item styling and focus-ring tokens.
src/​support-prompt-group/​prompt.tsx Accepts custom prompt classes.
src/​support-prompt-group/​internal.tsx Supports static and callback item classes.
src/​support-prompt-group/​__tests__/​style-api.test.tsx Tests item classes and prop filtering.
src/​internal/​style-api.scss Adds environment-gated Sass utilities.
src/​chat-bubble/​styles.scss Defines styling properties and border defaults.
src/​chat-bubble/​internal.tsx Applies root and bubble classes.
src/​chat-bubble/​__tests__/​style-api.test.tsx Tests styling slots and prop filtering.
src/​avatar/​styles.scss Adds tokens and updates border geometry.
src/​avatar/​mixins.scss Defines shared avatar styling tokens.
src/​avatar/​loading-dots/​styles.scss Inherits the customized avatar radius.
src/​avatar/​internal.tsx Applies custom root classes.
src/​avatar/​__tests__/​style-api.test.tsx Tests root classes and prop filtering.
src/​__tests__/​utils.ts Excludes styling output from component discovery.
src/​__tests__/​style-mixins.test.ts Snapshots generated Sass helpers.
src/​__tests__/​style-docs.test.ts Snapshots generated style documentation.
src/​__tests__/​__snapshots__/​style-mixins.test.ts.snap Records mixins for all three components.
src/​__tests__/​__snapshots__/​style-docs.test.ts.snap Records styling slots and properties.
scripts/​compile-styles.js Generates documentation and Sass helpers.
pages/​support-prompt-group/​style-api-v2.page.tsx Demonstrates callback-based item styling.
pages/​support-prompt-group/​style-api-v2.module.scss Styles prompt items and interaction states.
pages/​chat-bubble/​style-api-v2.page.tsx Demonstrates bubble styling slots.
pages/​chat-bubble/​style-api-v2.module.scss Customizes bubble appearance and spacing.
pages/​avatar/​style-api-v2.page.tsx Demonstrates styling across avatar variants.
pages/​avatar/​style-api-v2.module.scss Defines custom avatar appearances.

Review effort: Balanced

Comment thread scripts/compile-styles.js
path.join(targetDir, "internal/api-docs/style-api-doc", `${component}.json`),
JSON.stringify(docs, null, 2),
);
writeFile(path.join(targetDir, "styling", `${component}.scss`), generateSlotMixins({ component, docs }));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That is expected for now as style api v2 is not meant to be public yet.

@pan-kot
pan-kot force-pushed the chore-style-api-v2-avatar-bubble-support-prompt branch from 8453c6a to a4fb784 Compare October 29, 2026 08:39
@pan-kot
pan-kot force-pushed the chore-style-api-v2-avatar-bubble-support-prompt branch from a4fb784 to 210c5cf Compare October 29, 2026 10:39
@pan-kot
pan-kot marked this pull request as ready for review October 29, 2026 11:15
@pan-kot
pan-kot requested a review from a team as a code owner October 29, 2026 11:15
@pan-kot
pan-kot requested review from jperals and removed request for a team October 29, 2026 11:15
Comment thread src/support-prompt-group/styles.scss Outdated
@include style-api.docs(
"item",
$item-tokens,
$properties: (color, background, border, border-radius, padding, box-shadow)

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.

missing font properties (according to tracker)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Indeed! I will add them

This branch was successfully deployed

1 active deployment
dev-pages — 273594ec Deployed Oct 29, 2026 by pan-kot via deploy / deploy #826
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants