From f26b60dd234150f5dee169e42f3e698fd925f91c Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Thu, 8 Oct 2026 12:27:15 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=9A=EF=B8=8F=20refactor:=20Use=20Primi?= =?UTF-8?q?tive=20Tones,=20Variants=20and=20Shapes=20in=20Remaining=20Comp?= =?UTF-8?q?onents=20(#16872)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: Use Spinner Tones, Label Variants and Shared Button Props in Remaining Components Replaces text colour, round shape and size overrides with the primitives' own tone, variant, shape and size props where the merged classes are identical, drops redundant field overrides, and removes the prose and arbitrary transition classes that generated no CSS or have a token form. * test: Cover the Quiet Ink of the Marketplace Search Clear Button * test: Assert the Clear Button Hover Ink Only Where Hover Exists --- client/src/components/Agents/AgentGrid.tsx | 2 +- client/src/components/Agents/SearchBar.tsx | 6 +- .../Bookmarks/DeleteBookmarkButton.tsx | 2 +- .../Bookmarks/EditBookmarkButton.tsx | 2 +- .../components/Conversations/ConvoLink.tsx | 4 +- .../Conversations/ProjectsSection.tsx | 6 +- .../Input/SetKeyDialog/GoogleConfig.tsx | 2 +- .../Input/SetKeyDialog/InputWithLabel.tsx | 6 +- .../src/components/Insights/InsightsView.tsx | 6 +- .../components/MCP/CustomUserVarsSection.tsx | 3 +- .../src/components/MCP/MCPServerMenuItem.tsx | 8 +- .../components/MCP/MCPServerStatusIcon.tsx | 8 +- client/src/components/MCP/McpOAuthDialog.tsx | 2 +- client/src/components/MCP/StackedMCPIcons.tsx | 6 +- .../components/Messages/Content/CodeBlock.tsx | 2 +- .../Plugins/Store/PluginAuthForm.tsx | 2 +- .../src/components/Share/ShareArtifacts.tsx | 4 +- client/src/components/Share/ShareView.tsx | 7 +- .../Sharing/GenericGrantAccessDialog.tsx | 4 +- .../components/Tools/AssistantToolsDialog.tsx | 4 +- client/src/components/Web/SourceHovercard.tsx | 3 +- client/src/components/Web/Sources.tsx | 2 +- client/src/components/ui/Collapse.tsx | 2 +- .../components/ui/TermsAndConditionsModal.tsx | 2 +- client/src/routes/ChatRoute.tsx | 4 +- .../mock/scenarios/agent-search-clear.spec.ts | 43 ++++++++++ eslint-suppressions.json | 79 ++++--------------- 27 files changed, 108 insertions(+), 113 deletions(-) create mode 100644 e2e/specs/mock/scenarios/agent-search-clear.spec.ts diff --git a/client/src/components/Agents/AgentGrid.tsx b/client/src/components/Agents/AgentGrid.tsx index d8f11e6eaf..6a00e07cd6 100644 --- a/client/src/components/Agents/AgentGrid.tsx +++ b/client/src/components/Agents/AgentGrid.tsx @@ -431,7 +431,7 @@ const AgentGrid: React.FC = ({ aria-live="polite" aria-label={localize('com_agents_loading')} > - + {localize('com_agents_loading')} )} diff --git a/client/src/components/Agents/SearchBar.tsx b/client/src/components/Agents/SearchBar.tsx index a01afbb02e..6d2d41ac34 100644 --- a/client/src/components/Agents/SearchBar.tsx +++ b/client/src/components/Agents/SearchBar.tsx @@ -89,13 +89,11 @@ const SearchBar: React.FC = ({ value, onSearch, className = '' } {/* Show clear button only when search has value - Google style */} {searchTerm && ( diff --git a/client/src/components/Bookmarks/EditBookmarkButton.tsx b/client/src/components/Bookmarks/EditBookmarkButton.tsx index 7c4355be81..4e603f107d 100644 --- a/client/src/components/Bookmarks/EditBookmarkButton.tsx +++ b/client/src/components/Bookmarks/EditBookmarkButton.tsx @@ -32,7 +32,7 @@ const EditBookmarkButton: FC<{ onFocus={onFocus} onBlur={onBlur} onClick={() => setOpen(!open)} - className="h-8 w-8 p-0" + size="icon-sm" > diff --git a/client/src/components/Conversations/ConvoLink.tsx b/client/src/components/Conversations/ConvoLink.tsx index 8b9748c327..b9ce02b7e2 100644 --- a/client/src/components/Conversations/ConvoLink.tsx +++ b/client/src/components/Conversations/ConvoLink.tsx @@ -157,10 +157,10 @@ const ConvoLink: React.FC = ({ ref={titleRef} className={cn( isUnseen && !isGenerating && 'font-semibold', - 'min-w-0 flex-1 overflow-hidden [mask-size:100%_100%] [mask-position:left] [mask-repeat:no-repeat] [text-align:start] whitespace-nowrap [transition-property:mask-size] [transition-duration:0ms] [transition-timing-function:linear] [--convo-title-fade-width:24px] [--convo-title-reveal-duration:800ms] [&:dir(rtl)]:[mask-position:right]', + 'min-w-0 flex-1 overflow-hidden [mask-size:100%_100%] [mask-position:left] [mask-repeat:no-repeat] [text-align:start] whitespace-nowrap [transition-property:mask-size] duration-0 ease-linear [--convo-title-fade-width:24px] [--convo-title-reveal-duration:800ms] [&:dir(rtl)]:[mask-position:right]', isOverflowing && '[mask-image:linear-gradient(to_right,currentColor_calc(100%_-_var(--convo-title-fade-width)),transparent)] [&:dir(rtl)]:[mask-image:linear-gradient(to_left,currentColor_calc(100%_-_var(--convo-title-fade-width)),transparent)]', - 'data-[title-revealed=true]:[mask-size:calc(100%_+_var(--convo-title-fade-width))_100%] data-[title-revealed=true]:[transition-duration:var(--convo-title-reveal-duration)]', + 'data-[title-revealed=true]:[mask-size:calc(100%_+_var(--convo-title-fade-width))_100%] data-[title-revealed=true]:duration-(--convo-title-reveal-duration)', )} onDoubleClick={(e) => { if (isSmallScreen) { diff --git a/client/src/components/Conversations/ProjectsSection.tsx b/client/src/components/Conversations/ProjectsSection.tsx index fe16913f4a..4e9422b350 100644 --- a/client/src/components/Conversations/ProjectsSection.tsx +++ b/client/src/components/Conversations/ProjectsSection.tsx @@ -155,10 +155,10 @@ const ProjectChatsInline = memo(function ProjectChatsInline({ {hasMore && ( @@ -455,7 +455,7 @@ const ProjectsSection = ({ toggleNav, isAuthenticated }: ProjectsSectionProps) = if (isLoading && projects.length === 0) { return (
- +
); } diff --git a/client/src/components/Input/SetKeyDialog/GoogleConfig.tsx b/client/src/components/Input/SetKeyDialog/GoogleConfig.tsx index 0cd587ac8a..b984dcede2 100644 --- a/client/src/components/Input/SetKeyDialog/GoogleConfig.tsx +++ b/client/src/components/Input/SetKeyDialog/GoogleConfig.tsx @@ -28,7 +28,7 @@ const GoogleConfig = ({ userKey, setUserKey }: Pick {localize('com_endpoint_config_google_service_key')} - {subLabel && ( - + )}
diff --git a/client/src/components/Insights/InsightsView.tsx b/client/src/components/Insights/InsightsView.tsx index 66d41a9f0f..821a6a2372 100644 --- a/client/src/components/Insights/InsightsView.tsx +++ b/client/src/components/Insights/InsightsView.tsx @@ -129,7 +129,7 @@ function EmptyState({ message }: { message: string }) { function LoadingState({ message }: { message: string }) { return ( - + {message} ); @@ -448,7 +448,7 @@ function LatestConversations({

{localize('com_insights_latest_conversations')}

- {isFetching && } + {isFetching && }
{ diff --git a/client/src/components/MCP/CustomUserVarsSection.tsx b/client/src/components/MCP/CustomUserVarsSection.tsx index 827f88c2d2..02f67304f7 100644 --- a/client/src/components/MCP/CustomUserVarsSection.tsx +++ b/client/src/components/MCP/CustomUserVarsSection.tsx @@ -77,8 +77,7 @@ function AuthField({ name, config, hasValue, control, errors, autoFocus }: AuthF const placeholder = hasValue ? localize('com_ui_mcp_update_var', { 0: config.title }) : localize('com_ui_mcp_enter_var', { 0: config.title }); - const className = - 'w-full rounded border border-border-medium bg-transparent px-2 py-1 text-text-primary placeholder:text-text-secondary sm:text-sm'; + const className = 'w-full rounded border border-border-medium px-2 py-1 sm:text-sm'; // Prevent autofill: browser DOM mutations bypass React's synthetic // onChange, silently emptying react-hook-form state on submit. const sharedProps = { diff --git a/client/src/components/MCP/MCPServerMenuItem.tsx b/client/src/components/MCP/MCPServerMenuItem.tsx index 1f6e59c5ae..4e6af7a03e 100644 --- a/client/src/components/MCP/MCPServerMenuItem.tsx +++ b/client/src/components/MCP/MCPServerMenuItem.tsx @@ -57,16 +57,16 @@ export default function MCPServerMenuItem({ )} > {/* Server Icon with Status Dot */} -
+
{server.config?.iconPath ? ( ) : ( -
- +
+
)} {/* Status dot - decorative, status is announced via aria-label on MenuItem */} diff --git a/client/src/components/MCP/MCPServerStatusIcon.tsx b/client/src/components/MCP/MCPServerStatusIcon.tsx index bc730981d4..f5e637a446 100644 --- a/client/src/components/MCP/MCPServerStatusIcon.tsx +++ b/client/src/components/MCP/MCPServerStatusIcon.tsx @@ -167,7 +167,7 @@ function LoadingStatusIcon({ serverName, onCancel, canCancel }: InitializingStat aria-label={localize('com_ui_cancel')} >
- +
@@ -179,7 +179,8 @@ function LoadingStatusIcon({ serverName, onCancel, canCancel }: InitializingStat return (
@@ -190,7 +191,8 @@ function ConnectingSpinner({ serverName }: { serverName: string }) { return (
diff --git a/client/src/components/MCP/McpOAuthDialog.tsx b/client/src/components/MCP/McpOAuthDialog.tsx index ff4cda44d4..e6154f2979 100644 --- a/client/src/components/MCP/McpOAuthDialog.tsx +++ b/client/src/components/MCP/McpOAuthDialog.tsx @@ -77,7 +77,7 @@ export default function McpOAuthDialog({ * open smoothly without a hardcoded height, matching MCPToolItem. */}
diff --git a/client/src/components/MCP/StackedMCPIcons.tsx b/client/src/components/MCP/StackedMCPIcons.tsx index cdeb35214b..6b6f4fcf10 100644 --- a/client/src/components/MCP/StackedMCPIcons.tsx +++ b/client/src/components/MCP/StackedMCPIcons.tsx @@ -66,7 +66,7 @@ export default function StackedMCPIcons({ key={icon.key} title={icon.displayName} className={cn( - 'relative flex items-center justify-center rounded-full border', + 'text-text-primary relative flex items-center justify-center rounded-full border', colors.border, colors.bg, sizes.container, @@ -78,10 +78,10 @@ export default function StackedMCPIcons({ ) : ( - + )}
))} diff --git a/client/src/components/Messages/Content/CodeBlock.tsx b/client/src/components/Messages/Content/CodeBlock.tsx index 332981419b..73758521b1 100644 --- a/client/src/components/Messages/Content/CodeBlock.tsx +++ b/client/src/components/Messages/Content/CodeBlock.tsx @@ -139,7 +139,7 @@ const CodeBlock: React.FC = ({ {allowExecution === true && toolCalls && toolCalls.length > 0 && ( <>
-
+
{localize('com_ui_output')}
diff --git a/client/src/components/Plugins/Store/PluginAuthForm.tsx b/client/src/components/Plugins/Store/PluginAuthForm.tsx index de6b433cb3..f0cc29cf74 100644 --- a/client/src/components/Plugins/Store/PluginAuthForm.tsx +++ b/client/src/components/Plugins/Store/PluginAuthForm.tsx @@ -156,7 +156,7 @@ function PluginAuthForm({ }; return (
-