Skip to content

fix(Chat): add missing themeProps and fix className clobber - #4634

Open
cixzhang wants to merge 2 commits into
mainfrom
fix/component-audit-2026-08-01
Open

fix(Chat): add missing themeProps and fix className clobber#4634
cixzhang wants to merge 2 commits into
mainfrom
fix/component-audit-2026-08-01

Conversation

@cixzhang

@cixzhang cixzhang commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix theming class handling in three Chat sub-components:

ChatSendButton — the themeProps('chat-send-button') className was overwritten by the explicit className prop passed to Button. When a consumer provided className, the astryx-chat-send-button targeting class was lost. Now uses mergeProps to concatenate both classNames before passing to Button.

ChatDictationButton, ChatLayoutScrollButton — these exported components lacked a themeProps call entirely. Themes had no stable class to target them. Added themeProps('chat-dictation-button') and themeProps('chat-layout-scroll-button') to their root elements using the existing mergeProps pattern.

Testing

  • pnpm build passes (0 errors)
  • All 171 Chat tests pass (vitest run packages/core/src/Chat/)

Night Watch — Component Auditor

…utton

ChatSendButton: the themeProps className was overwritten by a subsequent
explicit className prop, losing the astryx-chat-send-button targeting class
when consumers pass className. Use mergeProps to concatenate both.

ChatDictationButton, ChatLayoutScrollButton: add themeProps calls so
themes can target these components via their stable astryx-* class names.
@cixzhang cixzhang added the hardening Component hardening and quality sweep label Aug 1, 2026
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview Aug 3, 2026 4:32pm

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 1, 2026
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

Chat (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 5367 -
Complexity N/A Very High (438) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.9KB 1.3KB

Accessibility Audit

Status: 1 accessibility violation(s) found — 1 serious.

Chat - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 2/8 stories · Learn more
    • WCAG: 1.4.3 (Level AA)

Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

github-actions Bot added a commit that referenced this pull request Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. hardening Component hardening and quality sweep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants