-
Notifications
You must be signed in to change notification settings - Fork 3
ENG-829 Move candidate node as child of new discourse node #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENG-829 Move candidate node as child of new discourse node #422
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
📝 WalkthroughWalkthroughModifies CreateNodeDialog to change how a page reference is inserted when a sourceBlockUid is present: instead of updating the source block’s text, it queries the source block’s parent and order, creates a new sibling block with the page reference, and moves the original source block under the new block. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CreateNodeDialog
participant roamAlphaAPI
participant createBlock
User->>CreateNodeDialog: Confirm create node (with sourceBlockUid)
CreateNodeDialog->>roamAlphaAPI: Datalog query to get parentUid, order
Note right of roamAlphaAPI: Returns parentUid and order of source block
roamAlphaAPI-->>CreateNodeDialog: parentUid, order
CreateNodeDialog->>createBlock: Create new block under parentUid with pageRef
Note right of createBlock: Returns newBlockUid
createBlock-->>CreateNodeDialog: newBlockUid
CreateNodeDialog->>roamAlphaAPI: Move sourceBlockUid under newBlockUid at order 0
Note over CreateNodeDialog,roamAlphaAPI: Source block becomes a child of the pageRef block
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
apps/roam/src/components/CreateNodeDialog.tsx (1)
14-14: Import looks good; drop now-unused updateBlock.Since you switched to createBlock, updateBlock (Line 6) appears unused; consider removing to keep lint clean.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/roam/src/components/CreateNodeDialog.tsx(3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-06-22T10:40:52.752Z
Learnt from: sid597
PR: DiscourseGraphs/discourse-graph#232
File: apps/roam/src/utils/getAllDiscourseNodesSince.ts:18-31
Timestamp: 2025-06-22T10:40:52.752Z
Learning: In apps/roam/src/utils/getAllDiscourseNodesSince.ts, the user confirmed that querying for `?title` with `:node/title` and mapping it to the `text` field in the DiscourseGraphContent type is the correct implementation for retrieving discourse node content from Roam Research, despite it appearing to query page titles rather than block text content.
Applied to files:
apps/roam/src/components/CreateNodeDialog.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
- GitHub Check: Graphite / mergeability_check
7610dad to
b7e7d4f
Compare
f9fc7ad to
22609b2
Compare
mdroidian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using roamjs-component functions instead rewriting queries.
* modify dom only for node tags * add background color to a nodetag * use it as color not background color * remove unused refresh * Roam: ENG-693 handle node tags with # in front and update placeholder to use # (#420) * use text not tag * Move the new block as first child of the current block (#422)
* use getDiscourseNodes * Eng-737 use node color to style node tags (#424) * modify dom only for node tags * add background color to a nodetag * use it as color not background color * remove unused refresh * Roam: ENG-693 handle node tags with # in front and update placeholder to use # (#420) * use text not tag * Move the new block as first child of the current block (#422)
* use getDiscourseNodes * Eng-737 use node color to style node tags (#424) * modify dom only for node tags * add background color to a nodetag * use it as color not background color * remove unused refresh * Roam: ENG-693 handle node tags with # in front and update placeholder to use # (#420) * use text not tag * Move the new block as first child of the current block (#422)

https://www.loom.com/share/67fc7b2aebaf4753b46ae96716da0e71?sid=4b464ba9-f841-4d8d-b46d-051850011c11