Skip to content

Commit 1561b46

Browse files
cliffhallclaude
andcommitted
Style Autocomplete dropdowns to match the rest of the app
Two fixes so the completion dropdowns on prompt-argument and resource-template inputs look like every other dropdown in the app: - App.css: the dark-mode dropdown / option-hover rules used to target .mantine-Select-* only, so the Autocomplete dropdowns shipped with Mantine's default surface color and a different hover background. Re-scoped to .mantine-Combobox-* so every Combobox-built input (Select, Autocomplete, MultiSelect, …) inherits the same styling. - theme/Autocomplete.ts: new theme module setting `radius: "md"` so Autocomplete matches the default Select / TextInput corner radius. Wired through theme/index.ts and theme/theme.ts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent fd1c731 commit 1561b46

4 files changed

Lines changed: 21 additions & 4 deletions

File tree

clients/web/src/App.css

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,20 @@
110110
background-color: var(--mantine-primary-color-light);
111111
}
112112

113-
/* ── Select dropdown / option (dark mode) ──────────────────────── */
114-
115-
[data-mantine-color-scheme="dark"] .mantine-Select-dropdown {
113+
/* ── Combobox dropdown / option (dark mode) ──────────────────────
114+
*
115+
* Targets `.mantine-Combobox-*` so the same dark-mode dropdown
116+
* background + hover apply to every Combobox-built input (Select,
117+
* Autocomplete, MultiSelect, TagsInput, …). Earlier this scoped to
118+
* `.mantine-Select-*` only and the argument-completion Autocompletes
119+
* shipped an unstyled dropdown that looked nothing like the rest of
120+
* the app's filter dropdowns. */
121+
122+
[data-mantine-color-scheme="dark"] .mantine-Combobox-dropdown {
116123
background-color: var(--mantine-color-gray-8);
117124
}
118125

119-
[data-mantine-color-scheme="dark"] .mantine-Select-option:hover {
126+
[data-mantine-color-scheme="dark"] .mantine-Combobox-option:hover {
120127
background-color: var(--mantine-primary-color-light);
121128
}
122129

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { Autocomplete } from "@mantine/core";
2+
3+
export const ThemeAutocomplete = Autocomplete.extend({
4+
defaultProps: {
5+
radius: "md",
6+
},
7+
});

clients/web/src/theme/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export { ThemeActionIcon } from "./ActionIcon";
22
export { ThemeAlert } from "./Alert";
33
export { ThemeAppShell } from "./AppShell";
4+
export { ThemeAutocomplete } from "./Autocomplete";
45
export { ThemeBadge } from "./Badge";
56
export { ThemeButton } from "./Button";
67
export { ThemeCard } from "./Card";

clients/web/src/theme/theme.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
ThemeActionIcon,
44
ThemeAlert,
55
ThemeAppShell,
6+
ThemeAutocomplete,
67
ThemeBadge,
78
ThemeButton,
89
ThemeCard,
@@ -55,6 +56,7 @@ export const theme = createTheme({
5556
ActionIcon: ThemeActionIcon,
5657
Alert: ThemeAlert,
5758
AppShell: ThemeAppShell,
59+
Autocomplete: ThemeAutocomplete,
5860
Badge: ThemeBadge,
5961
Button: ThemeButton,
6062
Card: ThemeCard,

0 commit comments

Comments
 (0)