From cd5dd94decdedb11997f6055e3ff44da17e638fa Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Tue, 6 Oct 2026 13:06:19 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20feat:=20Visible=20Prose=20Marker?= =?UTF-8?q?s=20and=20Composer=20Shape=20Roles=20for=20ClickHouse=20(#16736?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Chat/BackgroundTasks/Button.tsx | 2 +- .../Chat/Input/AskUserQuestionPopover.tsx | 4 +- .../components/Chat/Input/Composer/Bar.tsx | 3 +- .../Chat/Input/Composer/Palette.tsx | 4 +- .../Chat/Input/Composer/Thinking.tsx | 2 +- client/src/components/Chat/Input/Mention.tsx | 2 +- .../components/Chat/Input/PromptsCommand.tsx | 2 +- .../src/components/Chat/Input/Reasoning.tsx | 2 +- .../src/components/Chat/Input/SendButton.tsx | 2 +- .../components/Chat/Input/SkillsCommand.tsx | 2 +- .../src/components/Chat/Input/StopButton.tsx | 2 +- .../Chat/Input/TokenUsage/Popover.tsx | 2 +- .../Input/__tests__/appearanceTokens.spec.ts | 4 +- .../Chat/Input/__tests__/panelRadius.spec.ts | 65 +++++++ client/src/components/Chat/Input/chip.ts | 2 +- .../Chat/Menus/Endpoints/CustomMenu.tsx | 4 +- .../src/components/Chat/Messages/Feedback.tsx | 4 +- client/src/components/Chat/Messages/Fork.tsx | 8 +- .../src/components/Chat/approval/Review.tsx | 2 +- client/src/style.css | 15 +- .../scenarios/clickhouse-theme-shape.spec.ts | 4 +- .../mock/scenarios/message-theme.spec.ts | 4 +- e2e/specs/mock/scenarios/prose-shape.spec.ts | 162 ++++++++++++++++++ e2e/specs/mock/scenarios/theme-paint.spec.ts | 4 +- .../client/src/components/HoverCard.spec.tsx | 18 ++ packages/client/src/components/HoverCard.tsx | 2 +- .../client/src/components/IconButton.spec.tsx | 14 +- packages/client/src/components/IconButton.tsx | 4 +- .../client/src/components/SendActions.tsx | 2 +- packages/client/src/theme/README.md | 8 + packages/client/src/theme/defaults.css | 18 +- packages/client/src/theme/defaults.spec.ts | 5 +- packages/client/src/theme/fonts.css | 8 + .../fonts/inconsolata-latin-500-normal.woff2 | Bin 0 -> 18036 bytes packages/client/src/theme/registry.spec.ts | 40 +++++ packages/client/src/theme/registry.ts | 37 +++- packages/client/src/theme/tailwind.spec.js | 10 ++ .../src/theme/themes/clickhouse.spec.tsx | 42 +++++ .../client/src/theme/themes/clickhouse.ts | 10 ++ packages/client/src/theme/themes/clickui.json | 4 + .../client/src/theme/themes/clickui.spec.ts | 34 ++++ packages/client/src/theme/themes/dark.ts | 3 + packages/client/src/theme/themes/default.ts | 3 + .../client/src/theme/themes/highContrast.ts | 6 + packages/client/src/theme/tokens.css | 3 + packages/client/src/theme/types/index.ts | 20 +++ packages/client/src/utils/composer.spec.ts | 2 +- packages/client/src/utils/composer.ts | 2 +- packages/client/tailwind.preset.cjs | 3 + packages/data-provider/src/theme.ts | 7 + 50 files changed, 561 insertions(+), 51 deletions(-) create mode 100644 client/src/components/Chat/Input/__tests__/panelRadius.spec.ts create mode 100644 e2e/specs/mock/scenarios/prose-shape.spec.ts create mode 100644 packages/client/src/components/HoverCard.spec.tsx create mode 100644 packages/client/src/theme/fonts/inconsolata-latin-500-normal.woff2 diff --git a/client/src/components/Chat/BackgroundTasks/Button.tsx b/client/src/components/Chat/BackgroundTasks/Button.tsx index 91413fe30c..472f9433ac 100644 --- a/client/src/components/Chat/BackgroundTasks/Button.tsx +++ b/client/src/components/Chat/BackgroundTasks/Button.tsx @@ -129,7 +129,7 @@ function BackgroundTasksButton({ finalFocus={disclosureRef} aria-label={title} className={cn( - 'border-border-medium bg-surface-secondary text-text-primary z-[200] flex max-h-[min(36rem,calc(100vh-5rem))] max-w-[calc(100vw-2rem)] flex-col rounded-xl border shadow-lg focus:outline-none', + 'border-border-medium bg-surface-secondary text-text-primary rounded-theme-menu-panel z-[200] flex max-h-[min(36rem,calc(100vh-5rem))] max-w-[calc(100vw-2rem)] flex-col border shadow-lg focus:outline-none', wide ? 'w-[36rem]' : 'w-80', )} > diff --git a/client/src/components/Chat/Input/AskUserQuestionPopover.tsx b/client/src/components/Chat/Input/AskUserQuestionPopover.tsx index c54c323ec6..39e3df3414 100644 --- a/client/src/components/Chat/Input/AskUserQuestionPopover.tsx +++ b/client/src/components/Chat/Input/AskUserQuestionPopover.tsx @@ -56,7 +56,7 @@ function AskUserQuestionsPopoverPanel({ ask }: { ask: ReturnType {/* The prompt and answers each scroll within their own caps; this outer cap keeps the whole card on screen when both are at their limit on a short viewport. */} -
+
{/* Kept at full height so the cap above scrolls it rather than clipping its end. */}
diff --git a/client/src/components/Chat/Input/Composer/Bar.tsx b/client/src/components/Chat/Input/Composer/Bar.tsx index 8ef5ffb314..d57ab0e61d 100644 --- a/client/src/components/Chat/Input/Composer/Bar.tsx +++ b/client/src/components/Chat/Input/Composer/Bar.tsx @@ -97,6 +97,7 @@ function RoundButton({ event.stopPropagation()} - className="animate-composer-popover border-border-menu bg-surface-menu z-50 min-w-[10rem] rounded-xl border p-1 shadow-lg outline-hidden" + className="animate-composer-popover border-border-menu bg-surface-menu rounded-theme-menu-panel z-50 min-w-[10rem] border p-1 shadow-lg outline-hidden" > {modes.map((mode) => ( anchorRef.current?.getBoundingClientRect() ?? null} aria-label={localize('com_ui_composer_palette')} style={{ width: 'var(--popover-anchor-width)' }} - className="animate-composer-popover border-border-menu bg-surface-menu z-50 flex max-w-[95vw] flex-col overflow-hidden rounded-2xl border shadow-lg outline-hidden" + className="animate-composer-popover border-border-menu bg-surface-menu rounded-theme-popover z-50 flex max-w-[95vw] flex-col overflow-hidden border shadow-lg outline-hidden" > {/* The whole row is the search target, not just the input: the icon and the padding around it read as part of the field, so clicking @@ -1343,7 +1343,7 @@ function Palette({ onChange={(e) => setSearch(e.target.value)} onKeyDown={handleKeyDown} data-testid="composer-palette-search" - className="text-text-primary placeholder:text-text-secondary focus-visible:ring-text-primary w-full rounded-md border-0 bg-transparent text-sm shadow-none ring-0 focus:border-0 focus:ring-0 focus:outline-hidden focus-visible:ring-2 focus-visible:outline-hidden" + className="text-text-primary placeholder:text-text-secondary focus-visible:ring-focus-control w-full rounded-md border-0 bg-transparent text-sm shadow-none ring-0 focus:border-0 focus:ring-0 focus:outline-hidden focus-visible:ring-2 focus-visible:outline-hidden" /> {localize('com_ui_composer_palette_help', { 0: FAVORITE_MODIFIER })} diff --git a/client/src/components/Chat/Input/Composer/Thinking.tsx b/client/src/components/Chat/Input/Composer/Thinking.tsx index f5347220d7..7239a86450 100644 --- a/client/src/components/Chat/Input/Composer/Thinking.tsx +++ b/client/src/components/Chat/Input/Composer/Thinking.tsx @@ -232,7 +232,7 @@ function ThinkingControl({ aria-label={localize('com_ui_composer_thinking_value', { 0: display })} /* `border-light` resolves to the same value as `surface-tertiary`, so the edge was invisible against the popup's own background. */ - className="animate-composer-popover border-border-medium bg-surface-tertiary z-50 rounded-2xl border shadow-lg outline-hidden" + className="animate-composer-popover border-border-medium bg-surface-tertiary rounded-theme-popover z-50 border shadow-lg outline-hidden" > diff --git a/client/src/components/Chat/Input/Mention.tsx b/client/src/components/Chat/Input/Mention.tsx index 19ff8a437b..1685a47f35 100644 --- a/client/src/components/Chat/Input/Mention.tsx +++ b/client/src/components/Chat/Input/Mention.tsx @@ -182,7 +182,7 @@ function MentionContent({ return (
-
+
-
+