-
Notifications
You must be signed in to change notification settings - Fork 3
ENG-890 | ENG-891 - Ship pre populated tags and adjust tag placeholder #460
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-890 | ENG-891 - Ship pre populated tags and adjust tag placeholder #460
Conversation
…s for nodes in NodeConfig component in the format of abc-candidate
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
@CodeRabbit full review |
✅ Actions performedFull review triggered. |
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughIntroduces a helper to generate tag placeholders in NodeConfig and updates default discourse node data to include tag values for specific entries. The UI now derives the Tag input placeholder from node content, and two default nodes have explicit tag strings added. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as NodeConfig UI
participant Helper as generateTagPlaceholder
User->>UI: Open node settings
UI->>Helper: Request placeholder for node
alt Node has [[REF]] in format
Helper-->>UI: "#{ref-lower-3}-candidate"
else No ref found
Helper-->>UI: "#{text-lower-3}-candidate"
end
UI-->>User: Render Tag input with placeholder
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Pre-merge checks✅ Passed checks (3 passed)
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
apps/roam/src/components/settings/NodeConfig.tsx(2 hunks)apps/roam/src/data/defaultDiscourseNodes.ts(2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-25T15:53:21.799Z
Learnt from: sid597
PR: DiscourseGraphs/discourse-graph#372
File: apps/roam/src/components/DiscourseNodeMenu.tsx:116-116
Timestamp: 2025-08-25T15:53:21.799Z
Learning: In apps/roam/src/components/DiscourseNodeMenu.tsx, when handling tag insertion, multiple leading hashtags (like ##foo) should be preserved as they represent user intent, not normalized to a single hashtag. The current regex /^#/ is correct as it only removes one leading # before adding one back, maintaining any additional hashtags the user intended.
Applied to files:
apps/roam/src/data/defaultDiscourseNodes.tsapps/roam/src/components/settings/NodeConfig.tsx
📚 Learning: 2025-06-17T23:37:45.289Z
Learnt from: maparent
PR: DiscourseGraphs/discourse-graph#220
File: apps/roam/src/utils/conceptConversion.ts:42-56
Timestamp: 2025-06-17T23:37:45.289Z
Learning: In the DiscourseNode interface from apps/roam/src/utils/getDiscourseNodes.ts, the field `node.type` serves as the UID field rather than having a conventional `node.uid` field. This is an unusual naming convention where the type field actually contains the unique identifier.
Applied to files:
apps/roam/src/data/defaultDiscourseNodes.ts
#460) * Add default tags for Claim and Evidence nodes in defaultDiscourseNodes.ts * Add generateTagPlaceholder function to create dynamic tag placeholders for nodes in NodeConfig component in the format of abc-candidate * missed #
Prepopulated tags
Evidence:
#evd-candidateClaim:
#clm-candidatePlaceholders
Summary by CodeRabbit