From b41c3cdca5f35226412d12ac0cc0fd9f047c82de Mon Sep 17 00:00:00 2001 From: Trang Doan Date: Mon, 31 Aug 2026 13:50:40 -0400 Subject: [PATCH 1/7] ENG-2183 Build the new setting-item row component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add one shared settings row — scope indicator, label, always-visible description, control — and route every panel-based row through it. Descriptions move out of the hover popover that dismissed before its doc links could be clicked (ENG-2080). The fix is structural: the description renders as a sibling of the label, never a descendant, so a link inside it can no longer toggle the row's control. The rewire happens at SettingTitle, the one helper all five Base*Panels funnelled label and description through, so ~70 call sites are unchanged. Flag rows swap Checkbox for Switch to match the design. Scope is derived from the wrapper rather than passed per call site, because the wrapper already binds the setter that decides who a value is written for. Rows that cannot derive it pass `scope` explicitly. Layout is Tailwind, which resolves because Roam itself bundles Tailwind. Anything depending on Tailwind's preflight is hand-rolled instead: `border-b` and `border` set only a width, and `* { border-style: solid }` is absent, so those borders never paint. This repo's own `neutral-*` theme colours are likewise absent from Roam's build and are mirrored as CSS variables. Supersedes ENG-2186's SettingsDrillDownRow, whose two callers now compose the shared row with a trailing drill-down summary. Co-Authored-By: Claude Opus 5 --- .../roam/src/components/DiscourseNodeMenu.tsx | 5 +- .../components/DiscourseNodeSearchMenu.tsx | 4 +- .../settings/KeyboardShortcutInput.tsx | 58 ++-- .../src/components/settings/NodeConfig.tsx | 143 +++++---- .../components/settings/PageGroupPanel.tsx | 198 ++++++------ .../settings/PreferencesGeneral.tsx | 57 ++-- .../src/components/settings/QuerySettings.tsx | 35 +-- .../settings/SettingsDescription.tsx | 19 +- .../components/BlockPropSettingPanels.tsx | 291 +++++++++++------- .../components/EphemeralBlocksPanel.tsx | 32 +- .../components/SettingDrillDownSummary.tsx | 33 ++ .../settings/components/SettingItemRow.tsx | 112 +++++++ .../components/SettingKeycapInput.tsx | 21 ++ .../components/SettingsDrillDownRow.tsx | 31 -- apps/roam/src/styles/settingsStyles.css | 29 ++ 15 files changed, 674 insertions(+), 394 deletions(-) create mode 100644 apps/roam/src/components/settings/components/SettingDrillDownSummary.tsx create mode 100644 apps/roam/src/components/settings/components/SettingItemRow.tsx create mode 100644 apps/roam/src/components/settings/components/SettingKeycapInput.tsx delete mode 100644 apps/roam/src/components/settings/components/SettingsDrillDownRow.tsx diff --git a/apps/roam/src/components/DiscourseNodeMenu.tsx b/apps/roam/src/components/DiscourseNodeMenu.tsx index 46fdcc8ed..f5e569aea 100644 --- a/apps/roam/src/components/DiscourseNodeMenu.tsx +++ b/apps/roam/src/components/DiscourseNodeMenu.tsx @@ -4,11 +4,11 @@ import { Popover, Position, Button, - InputGroup, getKeyCombo, IKeyCombo, Icon, } from "@blueprintjs/core"; +import SettingKeycapInput from "~/components/settings/components/SettingKeycapInput"; import React, { useCallback, useEffect, @@ -496,7 +496,8 @@ export const NodeMenuTriggerComponent = ({ const shortcut = useMemo(() => comboToString(comboKey), [comboKey]); return ( - - {label} - - setIsActive(true)} - onBlur={() => setIsActive(false)} - rightElement={ -