Skip to content

Commit aae49b3

Browse files
authored
🧹 refactor: Clear the Raw-Color and Unknown-Class Design Suppressions (#16825)
* refactor: Clear the Raw-Color and Unknown-Class Design Suppressions * fix: Keep the Prose Classes style.css Still Reads * fix: Keep the split-parent Marker the Screenshot Spec Waits On * chore: Prune the Recorded Suppressions the Rebase Cleared
1 parent 1fcfbf4 commit aae49b3

11 files changed

Lines changed: 39 additions & 83 deletions

File tree

ā€Žclient/src/components/Chat/Input/AddedConvo.tsxā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function AddedConvo({
4444
conversation={addedConvo}
4545
endpointsConfig={endpointsConfig}
4646
agentsMap={agentsMap}
47-
containerClassName="shadow-stroke overflow-hidden rounded-full"
47+
containerClassName="avatar-stroke overflow-hidden rounded-full"
4848
context="menu-item"
4949
size={20}
5050
/>

ā€Žclient/src/components/Endpoints/ConvoIconURL.tsxā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const ConvoIconURL: React.FC<ConvoIconURLProps> = ({
5151
}
5252

5353
return (
54-
<div className="shadow-stroke bg-surface-primary text-text-primary relative flex h-full items-center justify-center rounded-full">
54+
<div className="avatar-stroke bg-surface-primary text-text-primary relative flex h-full items-center justify-center rounded-full">
5555
<ProviderIcon provider={provider} size={41} className="h-2/3 w-2/3" />
5656
</div>
5757
);

ā€Žclient/src/components/Endpoints/MessageEndpointIcon.tsxā€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const MessageEndpointIcon: React.FC<IconProps> = (props) => {
3131
className={cn('overflow-hidden rounded-full', props.className ?? '')}
3232
>
3333
<img
34-
className="shadow-stroke h-full w-full object-cover"
34+
className="avatar-stroke h-full w-full object-cover"
3535
src={iconURL}
3636
alt={assistantName}
3737
style={{ height: '80', width: '80' }}
@@ -40,7 +40,7 @@ const MessageEndpointIcon: React.FC<IconProps> = (props) => {
4040
</div>
4141
) : (
4242
<div className="h-6 w-6">
43-
<div className="shadow-stroke flex h-6 w-6 items-center justify-center overflow-hidden rounded-full">
43+
<div className="avatar-stroke flex h-6 w-6 items-center justify-center overflow-hidden rounded-full">
4444
<AssistantIcon className="text-text-tertiary h-2/3 w-2/3" />
4545
</div>
4646
</div>
@@ -60,7 +60,7 @@ const MessageEndpointIcon: React.FC<IconProps> = (props) => {
6060
className={cn('overflow-hidden rounded-full', props.className ?? '')}
6161
>
6262
<img
63-
className="shadow-stroke h-full w-full object-cover"
63+
className="avatar-stroke h-full w-full object-cover"
6464
src={iconURL}
6565
alt={agentName}
6666
style={{ height: '80', width: '80' }}
@@ -69,7 +69,7 @@ const MessageEndpointIcon: React.FC<IconProps> = (props) => {
6969
</div>
7070
) : (
7171
<div className="h-6 w-6">
72-
<div className="shadow-stroke flex h-6 w-6 items-center justify-center overflow-hidden rounded-full">
72+
<div className="avatar-stroke flex h-6 w-6 items-center justify-center overflow-hidden rounded-full">
7373
<Feather className="text-text-tertiary h-2/3 w-2/3" aria-hidden="true" />
7474
</div>
7575
</div>

ā€Žclient/src/components/SidePanel/Agents/AgentConfig.tsxā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default function AgentConfig({
124124
>
125125
<div className="flex w-full min-w-0 items-center gap-2">
126126
{providerValue !== undefined && (
127-
<div className="shadow-stroke bg-surface-primary text-text-primary relative flex h-6 w-6 shrink-0 items-center justify-center rounded-full">
127+
<div className="avatar-stroke bg-surface-primary text-text-primary relative flex h-6 w-6 shrink-0 items-center justify-center rounded-full">
128128
<ResolvedProviderIcon
129129
provider={providerId}
130130
imageURL={imageURL}

ā€Žclient/src/components/ui/TermsAndConditionsModal.tsxā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const TermsAndConditionsModal = ({
7676
className="max-h-[60vh] overflow-y-auto p-4"
7777
aria-label={localize('com_ui_terms_and_conditions')}
7878
>
79-
<div className="prose dark:prose-invert w-full max-w-none !text-text-primary">
79+
<div className="prose dark:prose-invert !text-text-primary w-full max-w-none">
8080
{content !== '' ? (
8181
<MarkdownLite content={content} />
8282
) : (

ā€Žclient/src/hooks/Input/useMentions.tsā€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const assistantMapFn =
4545
description: description ?? '',
4646
icon: EndpointIcon({
4747
conversation: { assistant_id: id, endpoint },
48-
containerClassName: 'shadow-stroke overflow-hidden rounded-full',
48+
containerClassName: 'avatar-stroke overflow-hidden rounded-full',
4949
endpointsConfig: endpointsConfig,
5050
context: 'menu-item',
5151
assistantMap,
@@ -119,7 +119,7 @@ export default function useMentions({
119119
endpoint: EModelEndpoint.agents,
120120
iconURL: avatar?.filepath,
121121
},
122-
containerClassName: 'shadow-stroke overflow-hidden rounded-full',
122+
containerClassName: 'avatar-stroke overflow-hidden rounded-full',
123123
endpointsConfig: endpointsConfig,
124124
context: 'menu-item',
125125
size: 20,
@@ -247,7 +247,7 @@ export default function useMentions({
247247
description: getPresetTitle(preset, true),
248248
icon: EndpointIcon({
249249
conversation: preset,
250-
containerClassName: 'shadow-stroke overflow-hidden rounded-full',
250+
containerClassName: 'avatar-stroke overflow-hidden rounded-full',
251251
endpointsConfig: endpointsConfig,
252252
context: 'menu-item',
253253
assistantMap,

ā€Žclient/src/style.cssā€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,9 +1560,11 @@ html {
15601560
}
15611561
}
15621562

1563+
.avatar-stroke,
15631564
.shadow-stroke {
15641565
position: relative;
15651566
}
1567+
.avatar-stroke:after,
15661568
.shadow-stroke:after {
15671569
--tw-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
15681570
--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);
@@ -1574,7 +1576,9 @@ html {
15741576
right: 0;
15751577
top: 0;
15761578
}
1579+
.dark .avatar-stroke:after,
15771580
.dark .shadow-stroke:after,
1581+
.avatar-stroke:after,
15781582
.shadow-stroke:after {
15791583
box-shadow:
15801584
0 0 transparent,
@@ -1584,6 +1588,7 @@ html {
15841588
var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent),
15851589
var(--tw-shadow);
15861590
}
1591+
.dark .avatar-stroke:after,
15871592
.dark .shadow-stroke:after {
15881593
--tw-shadow: inset 0 0 0 1px hsla(0, 0%, 100%, 0.3);
15891594
--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);

ā€Žeslint-suppressions.jsonā€Ž

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@
146146
"count": 1
147147
}
148148
},
149-
"client/src/components/Chat/Input/AddedConvo.tsx": {
150-
"shadcn/no-raw-colors": {
151-
"count": 1
152-
}
153-
},
154149
"client/src/components/Chat/Input/AskUserQuestionPopover.tsx": {
155150
"shadcn/no-restyle": {
156151
"count": 7
@@ -882,18 +877,10 @@
882877
"count": 2
883878
}
884879
},
885-
"client/src/components/Endpoints/ConvoIconURL.tsx": {
886-
"shadcn/no-raw-colors": {
887-
"count": 1
888-
}
889-
},
890880
"client/src/components/Endpoints/MessageEndpointIcon.tsx": {
891881
"shadcn/no-arbitrary-values": {
892882
"count": 1
893883
},
894-
"shadcn/no-raw-colors": {
895-
"count": 4
896-
},
897884
"shadcn/no-restyle": {
898885
"count": 3
899886
}
@@ -1454,9 +1441,6 @@
14541441
"shadcn/no-arbitrary-values": {
14551442
"count": 3
14561443
},
1457-
"shadcn/no-raw-colors": {
1458-
"count": 1
1459-
},
14601444
"shadcn/no-restyle": {
14611445
"count": 9
14621446
}
@@ -2016,21 +2000,11 @@
20162000
"count": 2
20172001
}
20182002
},
2019-
"packages/client/src/components/AnimatedSearchInput.tsx": {
2020-
"shadcn/no-raw-colors": {
2021-
"count": 1
2022-
}
2023-
},
20242003
"packages/client/src/components/Avatar.tsx": {
20252004
"shadcn/no-inline-styles": {
20262005
"count": 1
20272006
}
20282007
},
2029-
"packages/client/src/components/Badge.tsx": {
2030-
"shadcn/no-unknown-classes": {
2031-
"count": 6
2032-
}
2033-
},
20342008
"packages/client/src/components/Combobox.tsx": {
20352009
"shadcn/no-inline-styles": {
20362010
"count": 2
@@ -2079,9 +2053,6 @@
20792053
"packages/client/src/components/SplitText.tsx": {
20802054
"shadcn/no-inline-styles": {
20812055
"count": 7
2082-
},
2083-
"shadcn/no-unknown-classes": {
2084-
"count": 1
20852056
}
20862057
},
20872058
"packages/client/src/components/Toast.tsx": {
@@ -2094,36 +2065,6 @@
20942065
"count": 2
20952066
}
20962067
},
2097-
"packages/client/src/svgs/BirthdayIcon.tsx": {
2098-
"shadcn/no-raw-colors": {
2099-
"count": 10
2100-
}
2101-
},
2102-
"packages/client/src/svgs/DiscordIcon.tsx": {
2103-
"shadcn/no-raw-colors": {
2104-
"count": 2
2105-
}
2106-
},
2107-
"packages/client/src/svgs/FacebookIcon.tsx": {
2108-
"shadcn/no-raw-colors": {
2109-
"count": 3
2110-
}
2111-
},
2112-
"packages/client/src/svgs/GeminiIcon.tsx": {
2113-
"shadcn/no-raw-colors": {
2114-
"count": 2
2115-
}
2116-
},
2117-
"packages/client/src/svgs/GoogleIcon.tsx": {
2118-
"shadcn/no-raw-colors": {
2119-
"count": 4
2120-
}
2121-
},
2122-
"packages/client/src/svgs/PaLMIcon.tsx": {
2123-
"shadcn/no-raw-colors": {
2124-
"count": 7
2125-
}
2126-
},
21272068
"packages/client/src/svgs/SendMessageIcon.tsx": {
21282069
"shadcn/no-inline-styles": {
21292070
"count": 1

ā€Žeslint.config.mjsā€Ž

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ export default [
307307
'scroll-animation',
308308
'hover-button-active',
309309
'open',
310+
'split-parent',
310311
],
311312
},
312313
],
@@ -326,6 +327,23 @@ export default [
326327
'shadcn/require-static-classes': 'off',
327328
},
328329
},
330+
{
331+
// Entries 2 and 4 of packages/client/src/theme/allowlist.md: the third-party brand marks and
332+
// the opt-in multicolour illustration carry fixed `fill` literals that must not follow the
333+
// theme. The scope is these six files by name, so a new SVG or any other file still reports
334+
// its colours; the allowlist stays the record of why each one is here.
335+
files: [
336+
'packages/client/src/svgs/GoogleIcon.tsx',
337+
'packages/client/src/svgs/FacebookIcon.tsx',
338+
'packages/client/src/svgs/DiscordIcon.tsx',
339+
'packages/client/src/svgs/GeminiIcon.tsx',
340+
'packages/client/src/svgs/PaLMIcon.tsx',
341+
'packages/client/src/svgs/BirthdayIcon.tsx',
342+
],
343+
rules: {
344+
'shadcn/no-raw-colors': 'off',
345+
},
346+
},
329347
{
330348
files: ['**/.eslintrc.js', '**/jest.config.js', 'client/vite.config.ts'],
331349
languageOptions: {

ā€Žpackages/client/src/components/AnimatedSearchInput.tsxā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const AnimatedSearchInput = ({
6666
>
6767
<div className="absolute inset-0">
6868
<div
69-
className={`bg-gradient-radial from-accent-primary/10 absolute inset-0 to-transparent transition-opacity duration-700 ease-in-out ${isSearching && hasValue ? 'animate-pulse-slow opacity-100' : 'opacity-0'} `}
69+
className={`absolute inset-0 transition-opacity duration-700 ease-in-out ${isSearching && hasValue ? 'animate-pulse-slow opacity-100' : 'opacity-0'} `}
7070
/>
7171
<div
7272
className={`from-accent-primary/5 via-accent-primary/10 to-accent-primary/5 absolute inset-0 bg-gradient-to-r blur-xl transition-all duration-700 ease-in-out ${isSearching && hasValue ? 'animate-gradient-x opacity-100' : 'opacity-0'} `}

0 commit comments

Comments
Ā (0)