Skip to content

ENG-2183 Build the new setting-item row component - #1421

Open
trangdoan982 wants to merge 7 commits into
eng-2185-move-export-settings-out-of-settings-into-the-export-panelfrom
eng-2183-build-the-new-setting-item-row-component
Open

ENG-2183 Build the new setting-item row component#1421
trangdoan982 wants to merge 7 commits into
eng-2185-move-export-settings-out-of-settings-into-the-export-panelfrom
eng-2183-build-the-new-setting-item-row-component

Conversation

@trangdoan982

@trangdoan982 trangdoan982 commented Sep 8, 2026

Copy link
Copy Markdown
Member

Stacked on #1374 (ENG-2185).

Reviewer brief

  • Result: SettingItemRow renders every setting the same way: scope badge, label, always-visible description, control. Doc links in descriptions are clickable because the description no longer sits in a hover popover (ENG-2080). compact mode hides the badge and stacks the control below the label for narrow hosts like the Export dialog.
  • Review focus: SettingItemRow.tsx. The label is a <label> only when the control accepts the generated id. The description is a sibling of the label, not a child. Both keep a click on the text from toggling the wrong control. settingKeys stamps the data-setting-id anchor that search (ENG-2184) scrolls to.
  • Review focus: control variants. SettingKeycapInput is a narrow, centred, monospace input for shortcut keys. DiscourseNodeMenu and DiscourseNodeSearchMenu use it. SettingDrillDownSummary shows the current value with a chevron and pushes a route segment. It replaces SettingsDrillDownRow from ENG-2188.
  • Review focus: migrated rows. The generic panels in BlockPropSettingPanels.tsx render through the row. That moves NodeConfig, PreferencesGeneral, QuerySettings, PageGroupPanel, and ExportOptions onto it. Per-node settings are badged global because they live on the node type's page and apply to the whole graph.
  • Review focus: dividers. Rows draw no hairline. Only a section heading draws a rule.
  • Fixed in review: an earlier head rendered Specification and Index twice in the Identity group after a rebase. Commit 044c940 removes the duplicates.
  • Risk: SettingsDescription is now an inline div instead of the roamjs hover popover. Rows not yet on SettingItemRow change appearance too.

Verification

  • tsc --noEmit and eslint pass for apps/roam with no warnings on added lines. Production build completes with 0 errors.
  • Checked in Roam: descriptions and doc links are visible and clickable without hovering; the badge tooltip reads Personal or Graph-wide; Export dialog rows fit without overflow; Specification and Index each render once.

Loom video

Not recorded yet.

Scope check

  • Ran $scope-check against the ENG ticket and final diff.
  • Scope beyond Done When: the ticket leaves call-site migration to ENG-2187. This PR migrates the generic panels and about a dozen rows anyway, because the component has no consumer to test against otherwise. The remaining rows stay with ENG-2187.

Local delegated full review

  • Ran a comprehensive review of the entire final diff in a subagent with a fresh context.

🤖 Generated with Claude Code


Devin Review

@linear-code

linear-code Bot commented Sep 8, 2026

Copy link
Copy Markdown

ENG-2183

@graphite-app

graphite-app Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

PR size/scope check

This PR is over our review-size guideline.

  • Recommended: ~200 lines changed
  • Acceptable limit: up to 400 lines when well-scoped/self-contained
  • Preferred file count: fewer than 5 files

Please split this into smaller PRs unless there is a clear reason the changes need to land together.

If keeping it as one PR, please add a brief justification covering:

  • What single problem this PR solves
  • Why the files/changes are coupled

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
discourse-graph Skipped Skipped Sep 9, 2026 7:36pm UTC

Request Review

@supabase

supabase Bot commented Sep 8, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@trangdoan982 trangdoan982 changed the title Eng 2183 build the new setting item row component ENG-2183 Build the new setting-item row component Sep 8, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Comment thread apps/roam/src/components/settings/NodeConfig.tsx
Comment thread apps/roam/src/components/settings/NodeConfig.tsx Outdated
@trangdoan982
trangdoan982 force-pushed the eng-2183-build-the-new-setting-item-row-component branch from 882dd98 to d280e8c Compare September 8, 2026 21:54
@trangdoan982
trangdoan982 removed this pull request from stack #1423 September 9, 2026 19:16
@trangdoan982
trangdoan982 changed the base branch from eng-2188-node-type-settings-are-spread-across-seven-inner-tabs-put to eng-2185-move-export-settings-out-of-settings-into-the-export-panel September 9, 2026 19:20
@trangdoan982
trangdoan982 added this pull request to stack #1426 September 9, 2026 19:30
trangdoan982 and others added 7 commits September 9, 2026 15:36
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 <noreply@anthropic.com>
A node type's settings are written to that node type's own page block props, so
the whole graph sees them — the agreed badge model has two values, `just you`
and `everyone`, and a per-node scope was never one of them. Drops the invented
`nodeType` scope and its icon; the nine affected rows now badge as `global`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…verflow

Review feedback on the row component:

- Separators ran between sibling rows only, so they stopped at every group
  boundary. Each row now owns its bottom edge.
- BaseNumberPanel put `w-24` on the NumericInput, but Blueprint applies that
  class to the outer ControlGroup while the input keeps its intrinsic width;
  the box shrank and the input spilled past it (Advanced > Queries, and the
  same control in Export options). The width now sits on a wrapper and the
  input fills it.
- The Export dialog is too narrow for the trailing layout, so rows take a
  `compact` presentation there: no scope badge, control below the label,
  tighter vertical spacing — the shape the options had before this component.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The group heading's 2px rule already frames the group; a 1px hairline after
its last row put two rules at one boundary.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Hairlines under rows were inconsistent — present on flat rows, dropped after a
group's last row, absent on rows not yet on SettingItemRow — so they told the
eye nothing reliable. A line now appears in exactly one place, under a section
heading.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…tity group

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@trangdoan982
trangdoan982 force-pushed the eng-2183-build-the-new-setting-item-row-component branch from 044c940 to e723797 Compare September 9, 2026 19:36
@mdroidian

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-11T04:17:17.178898Z e723797 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mdroidian mdroidian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the loom video.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7237978cf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +44 to +46
--dg-neutral-dark: #1f1f1f;
--dg-neutral-light: #f1f1f1;
--dg-border: rgb(229, 231, 235);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Inherit host colors for setting rows

When Roam uses a dark or custom theme, these root variables still resolve to the fixed light-theme palette, and .dg-setting-row__label explicitly applies #1f1f1f; consequently every migrated setting label bypasses the host foreground color and can become unreadable. Inherit Roam's colors or use established Blueprint/Roam theme variables instead of defining a new neutral palette.

AGENTS.md reference: apps/roam/AGENTS.md:L9-L10

Useful? React with 👍 / 👎.

Comment on lines +60 to +62
const isAssociated = typeof control === "function";
// Description is a sibling of the label: nested, its doc links would toggle the control (ENG-2080).
const LabelTag = isAssociated ? "label" : "div";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Associate simple node controls with their row labels

When control is passed as a React element, this converts the visible label to a plain div. The migrated Color, Node search menu trigger, and Personal override inputs are all supplied this way and expose no explicit accessible label, so clicking their label no longer focuses the input and assistive technology encounters unnamed fields. Pass these simple controls as render callbacks and forward controlId, as KeyboardShortcutInput already does, or provide an equivalent explicit association.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants