Repository navigation
Convert tooltip, modal dialog, file attachment and transcript root classes to CSS modules - #5997
Eugene (OEvgeny) wants to merge 12 commits into
Conversation
… CSS module theme The tooltip keeps its webchat__tooltip class names through webChatPrefixedClassName.
…h the CSS module theme The dialog keeps its webchat__modal-dialog class names through webChatPrefixedClassName, so ViewCodeDialog.module.css and tests still select them.
…Fluent through the CSS module theme FileContent's local styles moved to FileContent.module.css; its class names keep the webchat__ prefix, so the option-driven "fileContent" style set entry still applies the style options and nothing renders differently.
…style them through the CSS module theme basic-transcript, __scrollable, __filler (BasicTranscript local styles), __activity-body (ActivityRow) and focus-trap (FocusTrap) come from CSS modules and keep their webchat__ class names, which code and tests still query.
…odules and style them through the CSS module theme webchat__surface (BasicWebChat local styles; the option-driven root style set entry stays) and webchat__css-custom-properties (Composer local styles) come from CSS modules and keep their names; CSSCustomPropertiesContainer still selects the latter for the style options.
…eason, as in the activity button FileContent, ActivityRow and FocusTrap declared local names for themes with ":not(*)" rules. They now use the declaration that the build strips once the class map is built.
… longer used for rendering Like the entries in #5881: customizing them has no effect, and their styles are in Popover.module.css and Tooltip.module.css.
…n the pull request
9b130dd to
cb28b4e
Compare
| @@ -0,0 +1,67 @@ | |||
| /* The tooltip positions itself against its parent, which can be any element. The hashed class name scopes this rule. */ | |||
| :has(> .tooltip) { | |||
There was a problem hiding this comment.
Think this is beneficial to scope under .webchat global class as other modules do
There was a problem hiding this comment.
Done in 6692552: the parent rule is now :global(.webchat) :has(> .tooltip), and the lightning-css vibe-grep rule accepts .webchat :has(> .w<hash>_…) (it still rejects :has() without the child combinator, without a hashed class, or outside .webchat).
| @@ -0,0 +1,27 @@ | |||
| :global(.webchat) .basic-transcript { | |||
| /* The element is also the transcript focus area, which TranscriptFocus.module.css lays out as a grid. */ | |||
There was a problem hiding this comment.
Maybe fold either of the module into another if it simplifies things
There was a problem hiding this comment.
Done in 5114be9: ActivityRow.module.css is folded into BasicTranscript.module.css (the class keeps its webchat__basic-transcript__activity-body name); FocusTrap.module.css stays separate because PartGroupingActivity also renders a focus trap.
… CSS modules are The lightning-css vibe-grep rule now also accepts ".webchat :has(> .w<hash>_", for a rule on the parent of a class.
Its only class, basic-transcript__activity-body, belongs to the transcript. FocusTrap.module.css stays: FocusTrap is also used by part grouping.
Changelog Entry
Changed
webchat__class names, so Fluent styles them through the CSS module theme, in PR #5997, by @OEvgenyRemoved
modalDialogandtooltipstyle set entries, which no longer affect rendering, in PR #5997, by @OEvgenyDescription
These 22 classes now come from CSS modules and keep their
webchat__names. Fluent styles 19 of them through<CSSModuleThemeComposer>.styleSet.modalDialogandstyleSet.tooltipno longer apply; stylewebchat__modal-dialogandwebchat__tooltipinstead. Both entries go on or after 2028-10-16.Design
fileContentandrootstyle set entries read style options and stay appliedSpecific Changes
Tooltip,Popover(style set entries@deprecated),FileContent,BasicTranscript(also forActivityRow),BasicWebChat,Composer,FocusTrapViewCodeDialog: out-specifies the modal dialog rules.changelog/<PR#>-<slug>.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed