Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔵 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
| 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 })); |
There was a problem hiding this comment.
That is expected for now as style api v2 is not meant to be public yet.
8453c6a to
a4fb784
Compare
a4fb784 to
210c5cf
Compare
| @include style-api.docs( | ||
| "item", | ||
| $item-tokens, | ||
| $properties: (color, background, border, border-radius, padding, box-shadow) |
There was a problem hiding this comment.
missing font properties (according to tracker)
641afbc to
273594e
Compare

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
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.