Skip to content

ENG-1190 Replace existing roam-js components with blockProp based ones#689

Merged
sid597 merged 2 commits intomainfrom
eng-1190-replace-existing-roam-js-components-with-blockprop-based
Feb 6, 2026
Merged

ENG-1190 Replace existing roam-js components with blockProp based ones#689
sid597 merged 2 commits intomainfrom
eng-1190-replace-existing-roam-js-components-with-blockprop-based

Conversation

@sid597
Copy link
Collaborator

@sid597 sid597 commented Jan 12, 2026

https://www.loom.com/share/8ff86c595970423bbf1ec161baf5efa4


Open with Devin

Summary by CodeRabbit

  • New Features
    • Added configurable settings panels for global and personal preferences, including text, boolean toggles, numeric inputs, dropdown selections, and multi-value options
    • Introduced feature flag configuration panel with validation and change callbacks for enhanced control

✏️ Tip: You can customize this high-level summary in your review settings.

@linear
Copy link

linear bot commented Jan 12, 2026

@supabase
Copy link

supabase bot commented Jan 12, 2026

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 ↗︎.

@sid597 sid597 changed the title common block-prop based components to replace roam-js components ENG-1190 Replace existing roam-js components with blockProp based ones Jan 12, 2026
@sid597 sid597 marked this pull request as ready for review January 12, 2026 15:27
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch from 0fb7fc7 to 62b0359 Compare January 17, 2026 18:16
@sid597 sid597 force-pushed the eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod branch 2 times, most recently from 1cdc812 to b206a69 Compare January 18, 2026 05:25
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch from 62b0359 to 40379a1 Compare January 18, 2026 05:25
@sid597 sid597 force-pushed the eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod branch from b206a69 to 9f56c90 Compare January 19, 2026 04:51
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch from 40379a1 to ac5f761 Compare January 19, 2026 04:51
@sid597 sid597 force-pushed the eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod branch from 9f56c90 to a7867cb Compare January 19, 2026 05:01
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch 2 times, most recently from 0cb1b4d to 08241e3 Compare January 19, 2026 06:03
@sid597 sid597 force-pushed the eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod branch from a7867cb to 464eb1a Compare January 19, 2026 06:03
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch from 08241e3 to a671592 Compare January 19, 2026 06:34
@sid597 sid597 force-pushed the eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod branch from 464eb1a to 3cb0f2b Compare January 19, 2026 06:34
@sid597 sid597 mentioned this pull request Jan 19, 2026
@sid597
Copy link
Collaborator Author

sid597 commented Jan 26, 2026

@coderabbitai full review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

✅ Actions performed

Full review triggered.

Copy link

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

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.

View issue and 4 additional flags in Devin Review.

Open in Devin Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Walkthrough

A new file introduces reusable, type-safe React setting panel components for the Roam application. It provides base implementations for text, boolean, number, select, and multi-text inputs with consistent UI layouts, along with higher-level wrappers for global and personal settings, and a specialized FeatureFlagPanel with optional pre/post-change hooks.

Changes

Cohort / File(s) Summary
Setting Panel Components
apps/roam/src/components/settings/components/BlockPropSettingPanels.tsx
New file with base components (BaseTextPanel, BaseFlagPanel, BaseNumberPanel, BaseSelectPanel, BaseMultiTextPanel) implementing core setting UI logic. Global wrappers (GlobalTextPanel, GlobalFlagPanel, GlobalNumberPanel, GlobalSelectPanel, GlobalMultiTextPanel) and personal wrappers (PersonalTextPanel, PersonalFlagPanel, PersonalNumberPanel, PersonalSelectPanel, PersonalMultiTextPanel) provide preset getter/setter bindings. Specialized FeatureFlagPanel supports optional onBeforeEnable pre-change hook and onAfterChange callback. Includes multi-text with add/remove flows and Enter-to-add interaction pattern.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title references replacing roam-js components with blockProp-based ones, which aligns with adding new blockProp setting panel components, but doesn't clearly convey that this PR only introduces new components without actually replacing existing ones. Clarify whether this PR actually replaces existing components or only introduces new blockProp panels; consider revising to 'Introduce blockProp-based setting panels' if replacement is in a separate PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@apps/roam/src/components/settings/components/BlockPropSettingPanels.tsx`:
- Around line 171-174: The handler for NumericInput (handleChange) must guard
against valueAsNumber being NaN to avoid storing NaN in settings: update
handleChange to check Number.isNaN(valueAsNumber) and in that case
setValue(undefined) (or another explicit empty sentinel) and call
setter(settingKeys, undefined) (or skip calling setter), otherwise call
setValue(valueAsNumber) and setter(settingKeys, valueAsNumber); reference the
handleChange function, NumericInput, setValue, setter and settingKeys when
making the change.
- Around line 131-147: The event handler handleChange uses
React.ChangeEvent<HTMLInputElement> but BlueprintJS Checkbox passes a
React.FormEvent<HTMLInputElement>; change the signature of handleChange to (e:
React.FormEvent<HTMLInputElement>) and read the value via
e.currentTarget.checked (or cast e.target to HTMLInputElement), update any
related references (handleChange usage and declaration) so setter(settingKeys,
checked) and onChange?.(checked) receive the correct boolean; keep the async
onBeforeChange flow intact and ensure imports/types reference React.FormEvent
where needed.
🧹 Nitpick comments (1)
apps/roam/src/components/settings/components/BlockPropSettingPanels.tsx (1)

200-202: Consider guarding against empty options array.

If options is an empty array and defaultValue is not provided, options[0] evaluates to undefined, which could cause unexpected behavior in HTMLSelect.

💡 Suggested defensive check
   const [value, setValue] = useState(
-    () => getter(settingKeys) ?? defaultValue ?? options[0],
+    () => getter(settingKeys) ?? defaultValue ?? options[0] ?? "",
   );

@sid597 sid597 changed the base branch from eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod to graphite-base/689 January 28, 2026 18:08
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch from 90303ff to 050f93b Compare January 28, 2026 18:56
@sid597 sid597 force-pushed the graphite-base/689 branch from d29fb40 to 0dab0a5 Compare January 28, 2026 18:56
@sid597 sid597 changed the base branch from graphite-base/689 to eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod January 28, 2026 18:56
@sid597 sid597 requested a review from mdroidian January 28, 2026 19:15
Copy link
Contributor

@mdroidian mdroidian left a comment

Choose a reason for hiding this comment

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

A few changes to make sure you do before merging.

Also, make sure to format with prettier before merging.

@sid597 sid597 changed the base branch from eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod to graphite-base/689 February 2, 2026 09:22
@mdroidian mdroidian changed the base branch from graphite-base/689 to main February 2, 2026 17:45
@sid597 sid597 changed the base branch from main to graphite-base/689 February 3, 2026 16:51
@sid597 sid597 force-pushed the graphite-base/689 branch from 941c0af to 34e7587 Compare February 3, 2026 16:51
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch from 050f93b to 9095d0b Compare February 3, 2026 16:51
@sid597 sid597 changed the base branch from graphite-base/689 to eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod February 3, 2026 16:51
@sid597 sid597 force-pushed the eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod branch from 34e7587 to 74fabe6 Compare February 4, 2026 17:56
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch from 9095d0b to 304f5f9 Compare February 4, 2026 17:56
Copy link

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

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View issue and 9 additional flags in Devin Review.

Open in Devin Review

@sid597 sid597 changed the base branch from eng-1188-create-a-pull-watch-handler-on-the-settings-page-per-feature-prod to graphite-base/689 February 6, 2026 12:23
@sid597 sid597 force-pushed the graphite-base/689 branch from 74fabe6 to 67f9604 Compare February 6, 2026 13:23
@sid597 sid597 force-pushed the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch from 304f5f9 to a4c9d2c Compare February 6, 2026 13:23
@sid597 sid597 changed the base branch from graphite-base/689 to main February 6, 2026 13:23
Copy link

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

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 9 additional findings in Devin Review.

Open in Devin Review

@sid597 sid597 merged commit 7769e02 into main Feb 6, 2026
8 checks passed
@sid597 sid597 deleted the eng-1190-replace-existing-roam-js-components-with-blockprop-based branch February 6, 2026 13:37
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