Skip to content

Convert chat history box, image avatar, error box, transcript list and media attachments to CSS modules - #6024

Open
Eugene (OEvgeny) wants to merge 3 commits into
mainfrom
OEvgeny/fix-css-modules-option-free-styles-2
Open

Eugene (OEvgeny) wants to merge 3 commits into
mainfrom
OEvgeny/fix-css-modules-option-free-styles-2

Conversation

@OEvgeny

@OEvgeny Eugene (OEvgeny) commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Continues the CSS Modules migration (#5997).

Changelog Entry

Changed

  • Converted the chat history box, image avatar, error box, transcript list and media attachments to CSS Modules with webchat__ class names, and videoHeight to --webchat__height--video, in PR #6024, by @OEvgeny

Removed

  • 💥 Deprecated the activities, audioAttachment, audioContent, chatHistoryBox, errorBox, imageAvatar, videoAttachment, videoContent, vimeoContent and youTubeContent style set entries, which no longer affect rendering, and removed the unused webchat__chat-history-box__toolbar--rtl class, in PR #6024, by @OEvgeny

Description

These components still used emotion style sets and now use CSS Modules. No snapshot changes.

Design

  • One PR for the 10 entries, as they share the pattern; the alternative is two PRs (media + videoHeight, and the other 4).
  • The scroll-to-end toolbar is outside the transcript's dir, so it gets its own dir for inset-inline-end; the --rtl class goes.

Specific Changes

  • ChatHistoryBox, ChatHistoryToolbar, ImageAvatar, ErrorBox: own *.module.css; the 6 media components: MediaAttachment.module.css; activities: BasicTranscript.module.css
  • --webchat__height--video: CustomPropertyNames.ts, CSSCustomPropertiesContainer.tsx; @deprecated: createStyleSet.ts, StyleSet/*.ts
  • Tests: rtl/scrollToEndButton.html (main: same pixels, :dir(rtl) fails), styleOptions/videoHeight.html (135 px; passes on main)
  • I have added tests and executed them locally
  • I have added .changelog/<PR#>-<slug>.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

Eugene Olonov added 3 commits November 5, 2026 12:55
…d media attachments to CSS modules

- 10 option-free style set entries move to CSS modules with webchat__ class names
  (useStyles + webChatPrefixedClassName); the 6 media entries share MediaAttachment.module.css
- videoHeight reaches CSS as --webchat__height--video
- activities: margin and padding-inline only, TranscriptFocus keeps padding-block
- Scroll-to-end toolbar: inset-inline-end + its own dir, --rtl class dropped
- @deprecated (since 4.19.3, removal on or after 2028-10-16) on the 10 entries
- New tests: rtl/scrollToEndButton.html, styleOptions/videoHeight.html
@OEvgeny
Eugene (OEvgeny) marked this pull request as ready for review November 6, 2026 06:52
Copilot AI balanced review requested due to automatic review settings November 6, 2026 06:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
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.

2 participants