Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/roam/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"react-draggable": "^4.4.5",
"react-in-viewport": "^1.0.0-alpha.20",
"react-vertical-timeline-component": "^3.5.2",
"roamjs-components": "^0.84.0",
"roamjs-components": "^0.84.1",
"signia-react": "^0.1.1"
},
"overrides": {
Expand Down
6 changes: 6 additions & 0 deletions apps/roam/src/components/DiscourseContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ import { Result } from "roamjs-components/types/query-builder";
import nanoId from "nanoid";
import getDiscourseContextResults from "../utils/getDiscourseContextResults";
import ResultsView from "./ResultsView/ResultsView";
import { getPageTitleValueByHtmlElement } from "roamjs-components/dom";
import getPageUidByPageTitle from "roamjs-components/queries/getPageUidByPageTitle";
import renderWithUnmount from "roamjs-components/util/renderWithUnmount";
import isDiscourseNode from "~/utils/isDiscourseNode";
import CanvasReferences from "./canvas/CanvasReferences";
import { OnloadArgs } from "roamjs-components/types/native";

export type DiscourseContextResults = Awaited<
ReturnType<typeof getDiscourseContextResults>
Expand Down
7 changes: 0 additions & 7 deletions apps/roam/src/components/LivePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import React, {
import ReactDOM from "react-dom";
import getChildrenLengthByPageUid from "roamjs-components/queries/getChildrenLengthByPageUid";
import getPageUidByPageTitle from "roamjs-components/queries/getPageUidByPageTitle";
import { render as renderReferenceContext } from "./ReferenceContext";
import isDiscourseNode from "../utils/isDiscourseNode";

const sizes = [300, 400, 500, 600];

Expand Down Expand Up @@ -50,11 +48,6 @@ const TooltipContent = ({
containerRef.current.parentElement.style.padding = "0";
newIsEmpty = false;
}
if (isDiscourseNode(uid) && containerRef.current) {
const refs = renderReferenceContext({ title: tag });
containerRef.current.appendChild(refs);
newIsEmpty = newIsEmpty && !refs.childElementCount;
}
setIsEmpty(newIsEmpty);
}, [uid, containerRef, numChildren, tag, setIsEmpty]);
return (
Expand Down
88 changes: 0 additions & 88 deletions apps/roam/src/components/ReferenceContext.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion apps/roam/src/components/canvas/LabelDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { RoamOverlayProps } from "roamjs-components/util/renderOverlay";
import { Result } from "~/utils/types";
import AutocompleteInput from "roamjs-components/components/AutocompleteInput";
import { DiscourseContextType } from "./Tldraw";
import { getPlainTitleFromSpecification } from "../../discourseGraphsMode";
import { getPlainTitleFromSpecification } from "~/utils/getPlainTitleFromSpecification";
import isLiveBlock from "roamjs-components/queries/isLiveBlock";
import getPageTitleByPageUid from "roamjs-components/queries/getPageTitleByPageUid";
import getTextByBlockUid from "roamjs-components/queries/getTextByBlockUid";
Expand Down
1 change: 0 additions & 1 deletion apps/roam/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export { default as QueryDrawer } from "./QueryDrawer";
export { default as QueryEditor } from "./QueryEditor";
export { default as QueryBuilder } from "./QueryBuilder";
export { default as QueryPagesPanel } from "./settings/QueryPagesPanel";
export { default as ReferenceContext } from "./ReferenceContext";
export { default as ResizableDrawer } from "./ResizableDrawer";
export { default as ResultsView } from "./ResultsView/ResultsView";
export { default as Timeline } from "./ResultsView/views/Timeline";
38 changes: 38 additions & 0 deletions apps/roam/src/data/defaultDiscourseRelations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ const DEFAULT_RELATION_VALUES: InputTextNode[] = [
{ text: "is a", children: [{ text: "destination" }] },
],
},
{
text: "Node Positions",
children: [
{ text: "0", children: [{ text: "100 57" }] },
{ text: "1", children: [{ text: "100 208" }] },
{ text: "2", children: [{ text: "100 345" }] },
{ text: "source", children: [{ text: "281 57" }] },
{ text: "destination", children: [{ text: "281 345" }] },
],
},
],
},
],
Expand Down Expand Up @@ -125,6 +135,20 @@ const DEFAULT_RELATION_VALUES: InputTextNode[] = [
},
],
},
{
text: "Node Positions",
children: [
{ text: "0", children: [{ text: "250 325" }] },
{ text: "1", children: [{ text: "100 325" }] },
{ text: "2", children: [{ text: "100 200" }] },
{ text: "3", children: [{ text: "250 200" }] },
{ text: "4", children: [{ text: "400 200" }] },
{ text: "5", children: [{ text: "100 75" }] },
{ text: "6", children: [{ text: "250 75" }] },
{ text: "source", children: [{ text: "400 325" }] },
{ text: "destination", children: [{ text: "400 75" }] },
],
},
],
},
],
Expand Down Expand Up @@ -215,6 +239,20 @@ const DEFAULT_RELATION_VALUES: InputTextNode[] = [
},
],
},
{
text: "Node Positions",
children: [
{ text: "0", children: [{ text: "250 325" }] },
{ text: "1", children: [{ text: "100 325" }] },
{ text: "2", children: [{ text: "100 200" }] },
{ text: "3", children: [{ text: "250 200" }] },
{ text: "4", children: [{ text: "400 200" }] },
{ text: "5", children: [{ text: "100 75" }] },
{ text: "6", children: [{ text: "250 75" }] },
{ text: "source", children: [{ text: "400 325" }] },
{ text: "destination", children: [{ text: "400 75" }] },
],
},
],
},
],
Expand Down
Loading
Loading