Repository navigation
Convert tooltip, modal dialog, file attachment and transcript root classes to CSS modules #5997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Eugene (OEvgeny)
wants to merge
15
commits into
main
Choose a base branch
from
OEvgeny/fix-css-fluent-context-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+598
−322
Draft
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
bc3c00a
Convert the tooltip to CSS Modules and style it in Fluent through the…
1919d15
Convert the modal dialog to CSS Modules and style it in Fluent throug…
ddf6762
Convert the file attachment classes to CSS Modules and style them in …
6b6fe9a
Convert the transcript classes that Fluent styles to CSS Modules and …
2f71e36
Convert the root surface and style options container classes to CSS M…
67aee9a
Keep class names of rules without styles through --webchat-preserve-r…
50eb0fa
Deprecate the modalDialog and tooltip style set entries, which are no…
5cd6455
Add the changelog fragment
4c191e5
Add the Changed entry to the changelog fragment
cb28b4e
Shorten the Removed changelog entry to one clause, with the details i…
6692552
Scope the tooltip's parent rule under .webchat, as the other Web Chat…
5114be9
Fold ActivityRow.module.css into BasicTranscript.module.css
9020231
Style the view code dialog's parts through a CSS module theme instead…
a6e951f
Move the view code dialog's rules for the modal dialog's parts into a…
6462678
Turn the transcript list and activity focus target classes into Basic…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| ### Changed | ||
|
|
||
| - Converted the tooltip, modal dialog, file attachment and transcript root classes to CSS Modules, keeping their `webchat__` class names, so Fluent styles them through the CSS module theme, in PR [#5997](https://github.com/microsoft/BotFramework-WebChat/pull/5997), by [@OEvgeny](https://github.com/OEvgeny) | ||
|
|
||
| ### Removed | ||
|
|
||
| - 💥 Deprecated the `modalDialog` and `tooltip` style set entries, which no longer affect rendering, in PR [#5997](https://github.com/microsoft/BotFramework-WebChat/pull/5997), by [@OEvgeny](https://github.com/OEvgeny) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /* Style options apply through the "fileContent" style set entry, which selects the "webchat__fileContent" class names. */ | ||
| :global(.webchat) .fileContent { | ||
| display: flex; | ||
|
|
||
| .fileContent__buttonLink { | ||
| display: flex; | ||
| flex: 1; | ||
| } | ||
|
|
||
| .fileContent__badge { | ||
| display: flex; | ||
| flex: 1; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| .fileContent__downloadIcon, | ||
| .fileContent__fileName, | ||
| .fileContent__size { | ||
| --webchat-preserve-reason: target-class; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
packages/component/src/Attachment/Text/private/ViewCodeDialog.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/component/src/Attachment/Text/private/ViewCodeDialogTheme.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /* The CSS module theme of the view code dialog: ActivityViewCodeButton passes it whole to showModal(), so the modal | ||
| dialog's parts get these class names, and only in this dialog. */ | ||
| /* The modal dialog rules (Popover.module.css) can come later in the stylesheet: ":is(dialog)" out-specifies them. */ | ||
| :global(.webchat) .modal-dialog:is(dialog) { | ||
| box-sizing: border-box; | ||
| display: grid; | ||
| height: 100%; | ||
| max-height: 100vh; | ||
| overflow: hidden; | ||
| padding: 1rem; | ||
| place-items: center; | ||
|
|
||
| .modal-dialog__box { | ||
| display: flex; | ||
| flex-direction: column; | ||
| max-height: 100%; | ||
| max-width: 100%; | ||
| position: relative; | ||
| } | ||
|
|
||
| .modal-dialog__close-button-layout { | ||
| position: absolute; | ||
| right: 0; | ||
| } | ||
|
|
||
| .modal-dialog__body { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: var(--webchat__padding--regular); | ||
| overflow: hidden; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| :global(.webchat) .basic-transcript { | ||
| /* The element is also the transcript focus area, which TranscriptFocus.module.css lays out as a grid. */ | ||
| overflow: hidden; | ||
| /* Make sure to set "position: relative" here to form another stacking context for the scroll-to-end button. */ | ||
| /* Stacking context help isolating elements that use "z-index" from global pollution. */ | ||
| /* https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context */ | ||
| position: relative; | ||
|
|
||
| .basic-transcript__filler { | ||
| flex: 1; | ||
| } | ||
|
|
||
| /* ActivityRow: no styles of its own, themes style it. */ | ||
| .basic-transcript__activity-body { | ||
| --webchat-preserve-reason: target-class; | ||
| } | ||
|
|
||
| .basic-transcript__scrollable { | ||
| display: flex; | ||
| flex-direction: column; | ||
| overflow-x: hidden; | ||
| -webkit-overflow-scrolling: touch; | ||
| } | ||
|
|
||
| .basic-transcript__transcript { | ||
| list-style-type: none; | ||
| } | ||
|
|
||
| .basic-transcript__activity-focus-target { | ||
| pointer-events: none; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| :global(.webchat) .surface { | ||
| display: flex; | ||
| flex-direction: column; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe fold either of the module into another if it simplifies things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 5114be9:
ActivityRow.module.cssis folded intoBasicTranscript.module.css(the class keeps itswebchat__basic-transcript__activity-bodyname);FocusTrap.module.cssstays separate becausePartGroupingActivityalso renders a focus trap.