Skip to content

[ENG-1545] Switch positions of node type and node title fields#907

Open
trangdoan982 wants to merge 6 commits intomainfrom
worktree-eng-1545-switch-positions-of-node-type-and-node-title-fields
Open

[ENG-1545] Switch positions of node type and node title fields#907
trangdoan982 wants to merge 6 commits intomainfrom
worktree-eng-1545-switch-positions-of-node-type-and-node-title-fields

Conversation

@trangdoan982
Copy link
Copy Markdown
Member

@trangdoan982 trangdoan982 commented Mar 22, 2026

https://youtu.be/X0MbEH5GjvU

Summary

  • Reorder fields: Content input now renders above Node Type selector, so users can immediately start typing a node title without picking a type first
  • Nullable Node Type: Node Type dropdown starts empty when opened via command palette; queries all discourse node types in parallel and auto-detects the type when a node is selected
  • Lock Node Type on selection: Node Type dropdown locks when a node is selected (unlocks when cleared)

ENG-1316 regression safety

All focus fixes preserved: autoFocus={!isContentLocked} on Content, autoFocus={false} on Node Type Label, popoverProps={{ openOnTargetFocus: false }}, keyup handler in FuzzySelectInput, and confirm button autoFocus={isContentLocked} with key remount.

Test plan

  • Command palette flow: Open modal → Content field focused, Node Type empty, all nodes shown → type to search → select a node → Node Type auto-populates and locks → Confirm focused
  • Tab flow: Content → Node Type → Source (if EVD) → Confirm
  • Canvas flow: Opens with pre-set nodeType → works as before (type not empty)
image
  • ENG-1316 regression: Select node via Enter → focus does NOT jump to Node Type dropdown
  • Lock/unlock: Select node → type locked → clear (X) → type unlocked, stays at detected value
  • Evidence flow: Select EVD type → Source field appears below Node Type
  • New node creation: Type a new name, select a type, confirm → node created correctly

🤖 Generated with Claude Code


Open with Devin

@linear
Copy link
Copy Markdown

linear bot commented Mar 22, 2026

@supabase
Copy link
Copy Markdown

supabase bot commented Mar 22, 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 ↗︎.

Copy link
Copy Markdown
Contributor

@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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional findings.

Open in Devin Review

trangdoan982 and others added 3 commits March 27, 2026 16:30
Move Content input above Node Type selector so users can immediately
start typing. Support empty Node Type (queries all node types),
auto-detect type on selection, and lock type when a node is selected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@trangdoan982 trangdoan982 force-pushed the worktree-eng-1545-switch-positions-of-node-type-and-node-title-fields branch from 43e24d0 to 91cec86 Compare March 27, 2026 20:51
style={{ pointerEvents: "all" }}
>
<div className={`${Classes.DIALOG_BODY} flex flex-col gap-4`}>
{/* Content Input */}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

renderModifyNodeDialog({
mode: "create",
nodeType: defaultNodeType,
nodeType: "",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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


const [selectedNodeType, setSelectedNodeType] = useState(() => {
const [selectedNodeType, setSelectedNodeType] = useState<
(typeof discourseNodes)[number] | null
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

devin-ai-integration[bot]

This comment was marked as resolved.

if (!selectedNodeType && r.uid) {
const detectedType = (r as Record<string, unknown>)
.discourseNodeType as string | undefined;
if (detectedType) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@trangdoan982 trangdoan982 requested a review from mdroidian April 6, 2026 15:26
Copy link
Copy Markdown
Member

@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.

Thank you for adding inline comments, but I'm not clear if this PR is solving all tickets, or these are intended to be some placeholder code. Unfortunately the YouTube video was private, so I'm not sure if that question was answered there.

If this PR is solving all tickets, make sure to link the PR to the Linear tickets.

This biggest change request is querying for all nodes when no node type is selected.

Comment thread apps/roam/src/components/ModifyNodeDialog.tsx
Comment thread apps/roam/src/components/ModifyNodeDialog.tsx Outdated
Comment thread apps/roam/src/components/ModifyNodeDialog.tsx Outdated
Comment thread apps/roam/src/components/ModifyNodeDialog.tsx Outdated
Comment thread apps/roam/src/components/ModifyNodeDialog.tsx Outdated
Comment thread apps/roam/src/components/ModifyNodeDialog.tsx Outdated
Comment thread apps/roam/src/components/ModifyNodeDialog.tsx Outdated
Comment thread apps/roam/src/components/ModifyNodeDialog.tsx Outdated
@trangdoan982
Copy link
Copy Markdown
Member Author

trangdoan982 commented Apr 15, 2026

@mdroidian this PR addresses all of the sub-tickets and the inline comments meant to point out the section that work on each sub-ticket. My bad I also made the video unlisted so you can see again. Same behavior except the focus now shows for the node type menu when user focuses there

Screenshot 2026-04-15 at 14 17 27

@mdroidian
Copy link
Copy Markdown
Member

mdroidian commented Apr 15, 2026

@mdroidian this PR addresses ...

Ok. If this PR is ready for review again, please tag me as a reviewer/re-request review.

@trangdoan982 trangdoan982 requested a review from mdroidian April 15, 2026 19:54
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