SelectControl: 32px trigger scale + option-group divider in the theme picker

This commit is contained in:
2026-06-12 21:46:53 +03:00
parent ca70b3e491
commit d1ba921141
8 changed files with 136 additions and 30 deletions
+6 -2
View File
@@ -100,10 +100,14 @@ function ChartThemeControl() {
// pattern); choosing it opens the builder and leaves the selection alone.
// It closes the custom-themes block — right after the built-ins, BEFORE the
// long preset roster — so it is visible without scrolling and sits next to
// the entries it manages.
// the entries it manages. The roster boundary itself (the divider) is set by
// chartThemeOptions where the order is decided, so the splice is the only
// index this component owns. The first preset is the divider-carrying option,
// so splicing right before it needs no count arithmetic.
// TODO: action row inside a value picker (visual separation? AT surprise?)
// parked for the batched council pass (docs/ux-second-pass.md).
list.splice(2 + customThemes.length, 0, {
const firstPreset = list.findIndex((o) => o.dividerBefore);
list.splice(firstPreset === -1 ? list.length : firstPreset, 0, {
value: EDIT_THEMES,
label: 'Edit themes…',
detail: 'Create and manage custom themes',