You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 32e2ae9
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: agent_docs/code_style.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -406,6 +406,24 @@ The UI is built with **Mantine components**, but **colors and surfaces** should
406
406
407
407
Mantine theme overrides in `packages/app/src/theme/**` may map Mantine’s scale to our palette; that does not replace using **`var(--color-...)`** in new styling where you need explicit color control.
408
408
409
+
## Click UI (incremental adoption)
410
+
411
+
`@clickhouse/click-ui` is a dependency of `packages/app`. `ThemeWrapper` mounts
412
+
`ClickUIProvider` inside `MantineProvider` with `persistTheme={false}`, so it
413
+
follows the HyperDX color mode and never writes its own theme to localStorage.
414
+
Storybook and `renderWithMantine` in tests get the provider for free.
415
+
416
+
-**Do**: Prefer a click-ui component over a new Mantine one when click-ui has
417
+
an equivalent for a simple primitive (`Link`, `Text`, `Title`, `Container`,
418
+
`Badge`, `Separator`, `Spacer`, `Icon`). Import from `@clickhouse/click-ui`.
419
+
-**Do not**: Mix both libraries inside one small component, and do not
420
+
replace working Mantine code outside the change you were asked to make.
421
+
-**Styling**: click-ui styles live in the `clickui` CSS cascade layer, so any
422
+
unlayered app or Mantine rule wins over them. Override `--click-*` variables
423
+
outside the layer if a token must change.
424
+
-**First use**: `packages/app/src/components/ContactSupportText.tsx` and the
425
+
`Click UI/Link` story in `packages/app/src/stories/ClickUI.stories.tsx`.
426
+
409
427
**Chart and visualization colors are a separate, more specific contract** — they have their own categorical, semantic, and heatmap palettes wired through `packages/app/src/utils.ts` helpers. Don't hard-code series colors or reuse `--color-text-*` for charts. See [`data_viz_colors.md`](./data_viz_colors.md) before touching anything that renders data.
0 commit comments