-
Notifications
You must be signed in to change notification settings - Fork 4
ENG-1187: Prod: Implement get and set for block prop based settings #669
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
Merged
sid597
merged 3 commits into
main
from
eng-1187-implement-get-and-set-setttings-as-block-properties-prod
Feb 6, 2026
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
260 changes: 129 additions & 131 deletions
260
apps/roam/src/components/settings/data/defaultRelationsBlockProps.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,142 +1,140 @@ | ||
| import type { DiscourseRelationSettings } from "~/components/settings/utils/zodSchema"; | ||
| /* eslint-disable @typescript-eslint/naming-convention */ // This is for nodePosition keys | ||
| import type { DiscourseRelationSettings } from "~/components/settings/utils/zodSchema"; | ||
|
|
||
| // TODO: Delete the original default relations in data/defaultRelations.ts when fully migrated. | ||
| const DEFAULT_RELATIONS_BLOCK_PROPS: DiscourseRelationSettings[] = [ | ||
| const DEFAULT_RELATIONS_BLOCK_PROPS: Record<string, DiscourseRelationSettings> = | ||
| { | ||
| id: "informs", | ||
| label: "Informs", | ||
| source: "_EVD-node", | ||
| destination: "_QUE-node", | ||
| complement: "Informed By", | ||
| ifConditions: [ | ||
| { | ||
| triples: [ | ||
| ["Page", "is a", "source"], | ||
| ["Block", "references", "Page"], | ||
| ["Block", "is in page", "ParentPage"], | ||
| ["ParentPage", "is a", "destination"], | ||
| ], | ||
| nodePositions: { | ||
| "0": "100 57", | ||
| "1": "100 208", | ||
| "2": "100 345", | ||
| source: "281 57", | ||
| destination: "281 345", | ||
| "_INFF-rel": { | ||
| label: "Informs", | ||
| source: "_EVD-node", | ||
| destination: "_QUE-node", | ||
| complement: "Informed By", | ||
| ifConditions: [ | ||
| { | ||
| triples: [ | ||
| ["Page", "is a", "source"], | ||
| ["Block", "references", "Page"], | ||
| ["Block", "is in page", "ParentPage"], | ||
| ["ParentPage", "is a", "destination"], | ||
| ], | ||
| nodePositions: { | ||
| "0": "100 57", | ||
| "1": "100 208", | ||
| "2": "100 345", | ||
| source: "281 57", | ||
| destination: "281 345", | ||
| }, | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| id: "supports", | ||
| label: "Supports", | ||
| source: "_EVD-node", | ||
| destination: "_CLM-node", | ||
| complement: "Supported By", | ||
| ifConditions: [ | ||
| { | ||
| triples: [ | ||
| ["Page", "is a", "source"], | ||
| ["Block", "references", "Page"], | ||
| ["SBlock", "references", "SPage"], | ||
| ["SPage", "has title", "SupportedBy"], | ||
| ["SBlock", "has child", "Block"], | ||
| ["PBlock", "references", "ParentPage"], | ||
| ["PBlock", "has child", "SBlock"], | ||
| ["ParentPage", "is a", "destination"], | ||
| ], | ||
| nodePositions: { | ||
| "0": "250 325", | ||
| "1": "100 325", | ||
| "2": "100 200", | ||
| "3": "250 200", | ||
| "4": "400 200", | ||
| "5": "100 75", | ||
| "6": "250 75", | ||
| source: "400 325", | ||
| destination: "400 75", | ||
| ], | ||
| }, | ||
| "_SUPP-rel": { | ||
| label: "Supports", | ||
| source: "_EVD-node", | ||
| destination: "_CLM-node", | ||
| complement: "Supported By", | ||
| ifConditions: [ | ||
| { | ||
| triples: [ | ||
| ["Page", "is a", "source"], | ||
| ["Block", "references", "Page"], | ||
| ["SBlock", "references", "SPage"], | ||
| ["SPage", "has title", "SupportedBy"], | ||
| ["SBlock", "has child", "Block"], | ||
| ["PBlock", "references", "ParentPage"], | ||
| ["PBlock", "has child", "SBlock"], | ||
| ["ParentPage", "is a", "destination"], | ||
| ], | ||
| nodePositions: { | ||
| "0": "250 325", | ||
| "1": "100 325", | ||
| "2": "100 200", | ||
| "3": "250 200", | ||
| "4": "400 200", | ||
| "5": "100 75", | ||
| "6": "250 75", | ||
| source: "400 325", | ||
| destination: "400 75", | ||
| }, | ||
| }, | ||
| }, | ||
| { | ||
| triples: [ | ||
| ["Page", "is a", "destination"], | ||
| ["Block", "references", "Page"], | ||
| ["SBlock", "references", "SPage"], | ||
| ["SPage", "has title", "Supports"], | ||
| ["SBlock", "has child", "Block"], | ||
| ["PBlock", "references", "ParentPage"], | ||
| ["PBlock", "has child", "SBlock"], | ||
| ["ParentPage", "is a", "source"], | ||
| ], | ||
| nodePositions: { | ||
| "7": "250 325", | ||
| "8": "100 325", | ||
| "9": "100 200", | ||
| "10": "250 200", | ||
| "11": "400 200", | ||
| "12": "100 75", | ||
| "13": "250 75", | ||
| source: "400 75", | ||
| destination: "400 325", | ||
| { | ||
| triples: [ | ||
| ["Page", "is a", "destination"], | ||
| ["Block", "references", "Page"], | ||
| ["SBlock", "references", "SPage"], | ||
| ["SPage", "has title", "Supports"], | ||
| ["SBlock", "has child", "Block"], | ||
| ["PBlock", "references", "ParentPage"], | ||
| ["PBlock", "has child", "SBlock"], | ||
| ["ParentPage", "is a", "source"], | ||
| ], | ||
| nodePositions: { | ||
| "7": "250 325", | ||
| "8": "100 325", | ||
| "9": "100 200", | ||
| "10": "250 200", | ||
| "11": "400 200", | ||
| "12": "100 75", | ||
| "13": "250 75", | ||
| source: "400 75", | ||
| destination: "400 325", | ||
| }, | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| id: "opposes", | ||
| label: "Opposes", | ||
| source: "_EVD-node", | ||
| destination: "_CLM-node", | ||
| complement: "Opposed By", | ||
| ifConditions: [ | ||
| { | ||
| triples: [ | ||
| ["Page", "is a", "source"], | ||
| ["Block", "references", "Page"], | ||
| ["SBlock", "references", "SPage"], | ||
| ["SPage", "has title", "OpposedBy"], | ||
| ["SBlock", "has child", "Block"], | ||
| ["PBlock", "references", "ParentPage"], | ||
| ["PBlock", "has child", "SBlock"], | ||
| ["ParentPage", "is a", "destination"], | ||
| ], | ||
| nodePositions: { | ||
| "0": "250 325", | ||
| "1": "100 325", | ||
| "2": "100 200", | ||
| "3": "250 200", | ||
| "4": "400 200", | ||
| "5": "100 75", | ||
| "6": "250 75", | ||
| source: "400 325", | ||
| destination: "400 75", | ||
| ], | ||
| }, | ||
| "_OPPP-rel": { | ||
|
sid597 marked this conversation as resolved.
Outdated
|
||
| label: "Opposes", | ||
| source: "_EVD-node", | ||
| destination: "_CLM-node", | ||
| complement: "Opposed By", | ||
| ifConditions: [ | ||
| { | ||
| triples: [ | ||
| ["Page", "is a", "source"], | ||
| ["Block", "references", "Page"], | ||
| ["SBlock", "references", "SPage"], | ||
| ["SPage", "has title", "OpposedBy"], | ||
| ["SBlock", "has child", "Block"], | ||
| ["PBlock", "references", "ParentPage"], | ||
| ["PBlock", "has child", "SBlock"], | ||
| ["ParentPage", "is a", "destination"], | ||
| ], | ||
| nodePositions: { | ||
| "0": "250 325", | ||
| "1": "100 325", | ||
| "2": "100 200", | ||
| "3": "250 200", | ||
| "4": "400 200", | ||
| "5": "100 75", | ||
| "6": "250 75", | ||
| source: "400 325", | ||
| destination: "400 75", | ||
| }, | ||
| }, | ||
| }, | ||
| { | ||
| triples: [ | ||
| ["Page", "is a", "destination"], | ||
| ["Block", "references", "Page"], | ||
| ["SBlock", "references", "SPage"], | ||
| ["SPage", "has title", "Opposes"], | ||
| ["SBlock", "has child", "Block"], | ||
| ["PBlock", "references", "ParentPage"], | ||
| ["PBlock", "has child", "SBlock"], | ||
| ["ParentPage", "is a", "source"], | ||
| ], | ||
| nodePositions: { | ||
| "7": "250 325", | ||
| "8": "100 325", | ||
| "9": "100 200", | ||
| "10": "250 200", | ||
| "11": "400 200", | ||
| "12": "100 75", | ||
| "13": "250 75", | ||
| source: "400 75", | ||
| destination: "400 325", | ||
| { | ||
| triples: [ | ||
| ["Page", "is a", "destination"], | ||
| ["Block", "references", "Page"], | ||
| ["SBlock", "references", "SPage"], | ||
| ["SPage", "has title", "Opposes"], | ||
| ["SBlock", "has child", "Block"], | ||
| ["PBlock", "references", "ParentPage"], | ||
| ["PBlock", "has child", "SBlock"], | ||
| ["ParentPage", "is a", "source"], | ||
| ], | ||
| nodePositions: { | ||
| "7": "250 325", | ||
| "8": "100 325", | ||
| "9": "100 200", | ||
| "10": "250 200", | ||
| "11": "400 200", | ||
| "12": "100 75", | ||
| "13": "250 75", | ||
| source: "400 75", | ||
| destination: "400 325", | ||
| }, | ||
| }, | ||
| }, | ||
| ], | ||
| }, | ||
| ]; | ||
| ], | ||
| }, | ||
| }; | ||
|
|
||
| export default DEFAULT_RELATIONS_BLOCK_PROPS; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.