aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2024-07-09 21:17:59 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2024-07-10 00:11:07 +0200
commitbf3b06f8cc775216e69e7f3e14d595a1db244f05 (patch)
treebfb6511e249cbe07d5cb183b42dac11cda9f94f7 /subprojects/frontend/src
parentbuild: do not build shadow jars (diff)
downloadrefinery-bf3b06f8cc775216e69e7f3e14d595a1db244f05.tar.gz
refinery-bf3b06f8cc775216e69e7f3e14d595a1db244f05.tar.zst
refinery-bf3b06f8cc775216e69e7f3e14d595a1db244f05.zip
feat: generator facade timeout and non-existent objects
Quality of life improvements for the semantics and generator facade APIs.
Diffstat (limited to 'subprojects/frontend/src')
-rw-r--r--subprojects/frontend/src/graph/GraphStore.ts5
-rw-r--r--subprojects/frontend/src/graph/GraphTheme.tsx15
-rw-r--r--subprojects/frontend/src/graph/dotSource.ts12
3 files changed, 29 insertions, 3 deletions
diff --git a/subprojects/frontend/src/graph/GraphStore.ts b/subprojects/frontend/src/graph/GraphStore.ts
index 86ffd802..30d0a2f3 100644
--- a/subprojects/frontend/src/graph/GraphStore.ts
+++ b/subprojects/frontend/src/graph/GraphStore.ts
@@ -233,4 +233,9 @@ export default class GraphStore {
233 get name(): string { 233 get name(): string {
234 return this.nameOverride ?? this.editorStore.simpleNameOrFallback; 234 return this.nameOverride ?? this.editorStore.simpleNameOrFallback;
235 } 235 }
236
237 get showNonExistent(): boolean {
238 const existsVisibility = this.visibility.get('builtin::exists') ?? 'none';
239 return existsVisibility !== 'none' || this.scopes;
240 }
236} 241}
diff --git a/subprojects/frontend/src/graph/GraphTheme.tsx b/subprojects/frontend/src/graph/GraphTheme.tsx
index bdc01b78..1127a46d 100644
--- a/subprojects/frontend/src/graph/GraphTheme.tsx
+++ b/subprojects/frontend/src/graph/GraphTheme.tsx
@@ -143,6 +143,21 @@ export function createGraphTheme({
143 'text.label-ERROR': { 143 'text.label-ERROR': {
144 fill: theme.palette.error.main, 144 fill: theme.palette.error.main,
145 }, 145 },
146 '.node-exists-FALSE': {
147 'text:not(.label-ERROR)': {
148 fill: theme.palette.text.secondary,
149 },
150 '.node-outline': {
151 stroke: theme.palette.text.secondary,
152 strokeDasharray: '2 4',
153 },
154 '.node-header': {
155 fill: theme.palette.background.default,
156 },
157 '.icon-TRUE': {
158 fill: theme.palette.text.secondary,
159 },
160 },
146 }; 161 };
147} 162}
148 163
diff --git a/subprojects/frontend/src/graph/dotSource.ts b/subprojects/frontend/src/graph/dotSource.ts
index ce504c37..9099cd09 100644
--- a/subprojects/frontend/src/graph/dotSource.ts
+++ b/subprojects/frontend/src/graph/dotSource.ts
@@ -128,11 +128,16 @@ function createNodes(
128 const { 128 const {
129 semantics: { nodes }, 129 semantics: { nodes },
130 scopes, 130 scopes,
131 showNonExistent,
131 } = graph; 132 } = graph;
132 133
133 nodes.forEach((node, i) => { 134 nodes.forEach((node, i) => {
134 const data = nodeData[i]; 135 const data = nodeData[i];
135 if (data === undefined || data.isolated || data.exists === 'FALSE') { 136 if (
137 data === undefined ||
138 data.isolated ||
139 (!showNonExistent && data.exists === 'FALSE')
140 ) {
136 return; 141 return;
137 } 142 }
138 const classList = [ 143 const classList = [
@@ -255,6 +260,7 @@ function createRelationEdges(
255): void { 260): void {
256 const { 261 const {
257 semantics: { nodes, partialInterpretation }, 262 semantics: { nodes, partialInterpretation },
263 showNonExistent,
258 } = graph; 264 } = graph;
259 const { detail } = relation; 265 const { detail } = relation;
260 266
@@ -297,9 +303,9 @@ function createRelationEdges(
297 const toData = nodeData[to]; 303 const toData = nodeData[to];
298 if ( 304 if (
299 fromData === undefined || 305 fromData === undefined ||
300 fromData.exists === 'FALSE' ||
301 toData === undefined || 306 toData === undefined ||
302 toData.exists === 'FALSE' 307 (!showNonExistent &&
308 (fromData.exists === 'FALSE' || toData.exists === 'FALSE'))
303 ) { 309 ) {
304 return; 310 return;
305 } 311 }