Skip to content

Commit aaf937b

Browse files
authored
feat: add custom variants support (#5675)
* feat: add custom variants support * Changelog * fix nits * remove unused class
1 parent 6173092 commit aaf937b

File tree

121 files changed

+344
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+344
-27
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
:is(.webchat-fluent .sendbox.wKGyPWW_variant-copilot-deprecated) .sendbox__text-counter:not(.sendbox__text-counter--error) {
2+
visibility: hidden;
3+
}
4+
.webchat-fluent .activity-loader.wKGyPWW_variant-copilot-deprecated {
5+
margin: var(--webchat-spacingVerticalXS) 0 var(--webchat-spacingVerticalXS) -10px;
6+
}
7+
8+
.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated {
9+
--webchat-part-grouping__message-status--space-block: var(--webchat-spacingVerticalNone);
10+
position: relative;
11+
}
12+
13+
.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated .part-grouping-decorator__header {
14+
padding-block: var(--webchat-spacingVerticalS);
15+
}
16+
.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated.part-grouping-decorator--from-bot:has(.part-grouping-decorator__header) + .part-grouping-decorator--from-bot:has(.part-grouping-decorator__header) .part-grouping-decorator__header {
17+
display: none;
18+
}
19+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated).part-grouping-decorator--group {
20+
--webchat-part-grouping__message-status--space-block: var(--webchat-spacingVerticalXS);
21+
}
22+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated).part-grouping-decorator--from-bot {
23+
--webchat-part-grouping__bubble--background-color: transparent;
24+
--webchat-part-grouping__bubble--border-radius: var(--webchat-borderRadius2XLarge);
25+
--webchat-part-grouping__bubble--space-block: var(--webchat-spacingVerticalNone);
26+
--webchat-part-grouping__bubble--space-inline: var(--webchat-spacingHorizontalNone);
27+
--webchat-part-grouping__bubble--max-width: 100%;
28+
--webchat-part-grouping__bubble--min-height: 20px;
29+
--webchat-part-grouping__code-block--space-inline: var(--webchat-spacingHorizontalNone);
30+
}
31+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated) .activity-status {
32+
margin: 0 0 var(--webchat-spacingHorizontalXXS);
33+
}
34+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated) .stacked-layout__status {
35+
order: -1;
36+
}
37+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated):has(.bubble--from-user) .bubble {
38+
margin-block-end: var(--webchat-spacingVerticalM);
39+
}
40+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated):has(.bubble.bubble--from-user),
41+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated):has(.pre-chat-message-activity),
42+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated):has(.liner-message-activity) {
43+
padding-inline-start: var(--webchat-spacingHorizontalNone);
44+
}
45+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated) .bubble .text-content .text-content__generated-badge {
46+
display: none;
47+
}
48+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated) .stacked-layout:has(.collapsible-grouping) {
49+
margin-inline: var(--webchat-spacingHorizontalNone);
50+
}
51+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated) .collapsible-grouping__content {
52+
anchor-name: --webchat-flair;
53+
background: var(--webchat-colorNeutralBackground1);
54+
border-radius: var(--webchat-borderRadius2XLarge);
55+
}
56+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated) .stacked-layout .stacked-layout__message-status {
57+
margin-inline: var(--webchat-spacingHorizontalNone) var(--webchat-spacingHorizontalS);
58+
}
59+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated) .border-flair {
60+
border-radius: var(--webchat-borderRadius2XLarge);
61+
inset: anchor(top) anchor(right) anchor(bottom) anchor(left);
62+
position-anchor: --webchat-flair;
63+
}
64+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated).part-grouping-decorator--from-bot {
65+
margin-inline-end: var(--webchat-spacingHorizontalXXL);
66+
}
67+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated).part-grouping-decorator--from-bot .stacked-layout {
68+
margin: 0;
69+
position: static;
70+
}
71+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated).part-grouping-decorator--from-bot .bubble {
72+
width: var(--webchat-part-grouping__bubble--max-width);
73+
position: static;
74+
}
75+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated).part-grouping-decorator--from-bot:not(.part-grouping-decorator--group) .bubble__content {
76+
gap: var(--webchat-spacingVerticalS);
77+
flex-direction: column;
78+
display: flex;
79+
}
80+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated).part-grouping-decorator--from-bot .bubble .collapsible-content .collapsible-content__content {
81+
margin-block: var(--webchat-spacingVerticalNone);
82+
}
83+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated).part-grouping-decorator--from-bot .bubble .collapsible-content .collapsible-content__content .stacked-layout__attachment-list {
84+
margin-block-start: var(--webchat-spacingVerticalS);
85+
}
86+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated).part-grouping-decorator--from-bot .bubble .collapsible-content .collapsible-content__content .stacked-layout__attachment {
87+
max-width: var(--webchat-part-grouping__bubble--max-width);
88+
}
89+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated).part-grouping-decorator--from-bot .stacked-layout__status {
90+
display: none;
91+
}
92+
:is(.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated):not(.part-grouping-decorator--group) .bubble:not(.bubble--from-user) .bubble__content {
93+
anchor-name: --webchat-flair;
94+
max-width: unset;
95+
}
96+
.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated {
97+
padding-inline-start: var(--webchat-spacingHorizontalMNudge);
98+
}
99+
.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated .collapsible-grouping {
100+
margin-inline-end: var(--webchat-spacingHorizontalXXL);
101+
}
102+
.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated.part-grouping-decorator--from-bot .bubble__content {
103+
box-sizing: content-box;
104+
margin-block: calc(var(--webchat-spacingVerticalS) * -1);
105+
margin-inline: calc(var(--webchat-spacingHorizontalS) * -1);
106+
padding-block: var(--webchat-spacingVerticalS);
107+
padding-inline: var(--webchat-spacingHorizontalS);
108+
}
109+
.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated .stacked-layout .transcript-focus-area__activity-list {
110+
--webchat--collapsible-grouping__list--gap: var(--webchat-spacingVerticalL);
111+
}
112+
.webchat-fluent .part-grouping-decorator.wKGyPWW_variant-copilot-deprecated .bubble:not(.bubble--from-user):after {
113+
margin-block: var(--webchat-spacingVerticalXS);
114+
outline-offset: 5px;
115+
--webchat-part-grouping__bubble--border-radius: calc(var(--webchat-borderRadius2XLarge) - 8px);
116+
}
117+
.webchat-fluent.theme.wKGyPWW_variant-copilot-deprecated .webchat__css-custom-properties {
118+
--webchat__padding--sendbox: var(--webchat-spacingVerticalNone) var(--webchat-spacingHorizontalXL) var(--webchat-spacingVerticalMNudge) var(--webchat-spacingHorizontalMNudge);
119+
}
120+
.webchat-fluent.theme.wKGyPWW_variant-copilot-deprecated .webchat__surface {
121+
box-sizing: border-box;
122+
padding-inline-start: var(--webchat-spacingHorizontalMNudge);
123+
}
124+
.webchat-fluent.theme.wKGyPWW_variant-copilot-deprecated .transcript-focus-area {
125+
--webchat__transcript--spacing: var(--webchat-spacingVerticalM);
126+
}
127+
.webchat-fluent.theme.wKGyPWW_variant-copilot-deprecated .webchat__basic-transcript .webchat__basic-transcript__scrollable {
128+
scrollbar-gutter: stable;
129+
}
130+
.webchat-fluent.theme.wKGyPWW_variant-copilot-deprecated .transcript-focus-area:focus-visible .transcript-focus-area__content--focused .collapsible-grouping:after {
131+
inset: -2px -4px;
132+
}
133+
.webchat-fluent.theme.wKGyPWW_variant-copilot-deprecated .webchat__basic-transcript .webchat__basic-transcript__filler {
134+
flex-grow: 0;
135+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>Two Chat panes side-by-side (dark): code block with dark theme navigation (right)</title>
5+
<script>
6+
location = './?variant=fluent&variant=variant-copilot-deprecated%20wKGyPWW_variant-copilot-deprecated&transcript=0&transcript=5&focus=1&focus-preset=viewCode&codeBlockTheme=github-dark-default&theme=fluent-dark';
7+
</script>
8+
</head>
9+
<body></body>
10+
</html>
203 KB
203 KB
202 KB
225 KB
202 KB
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>Two Chat panes side-by-side: code block with dark theme navigation (right)</title>
5+
<script>
6+
location = './?variant=fluent&variant=variant-copilot-deprecated%20wKGyPWW_variant-copilot-deprecated&transcript=0&transcript=5&focus=1&focus-preset=viewCode&codeBlockTheme=github-dark-default';
7+
</script>
8+
</head>
9+
<body></body>
10+
</html>
223 KB

0 commit comments

Comments
 (0)