You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/001-construct-graph-viz/research.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -240,7 +240,7 @@ function triplesToGraph(triples, prefixes) {
240
240
241
241
### 4. Color Coding Logic
242
242
243
-
**Question**: How to implement the color scheme (grey for literals, green for rdf:type objects, blue for other URIs)?
243
+
**Question**: How to implement the color scheme (light grey for literals, light green for rdf:type objects, light blue for other URIs, orange for blank nodes)?
244
244
245
245
**Implementation**:
246
246
```javascript
@@ -272,7 +272,7 @@ nodes: {
272
272
}
273
273
```
274
274
275
-
**Decision**: Calculate color during node creation, pass to vis-network node data. Use hex codes: `#808080` (grey), `#00FF00` (green), `#0000FF` (blue).
275
+
**Decision**: Calculate color during node creation, pass to vis-network node data. Use hex codes: `#c5c5c5ff` (light grey), `#a6c8a6ff` (light green), `#97C2FC` (light blue), `#e15b13ff` (orange).
Copy file name to clipboardExpand all lines: specs/001-construct-graph-viz/spec.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
12
12
- Q: What visual styling should be used for graph nodes to distinguish between different node types and content lengths? → A: All nodes use uniform shape (circle/ellipse) with fixed size, regardless of label length or type
13
13
- Q: How should tooltips be triggered and displayed to balance information access with usability? → A: Hover only with 300ms delay before showing, auto-hide on mouse leave
14
-
- Q: How should the plugin handle blank nodes (anonymous RDF nodes with no URI) that appear in CONSTRUCT results? → A: Display with generated label but use unique color (e.g., yellow) to distinguish from literals
14
+
- Q: How should the plugin handle blank nodes (anonymous RDF nodes with no URI) that appear in CONSTRUCT results? → A: Display with generated label but use unique orange color (#e15b13ff) to distinguish from literals
15
15
- Q: When the same subject and object are connected by multiple different predicates, how should these be displayed? → A: Draw separate parallel edges for each predicate (may overlap/curve to show multiple)
16
16
17
17
## User Scenarios & Testing *(mandatory)*
@@ -92,7 +92,7 @@ While exploring the graph, the user wants to see detailed information about node
92
92
-**Very long literals**: How are literals with thousands of characters displayed? → Truncate label to ~50 characters, full value in tooltip
93
93
-**Duplicate triples**: What happens when identical triples appear multiple times? → Display as single edge (no duplicate edges between same nodes with same predicate)
94
94
-**Multiple predicates between same nodes**: What happens when `<A> <p1> <B>` and `<A> <p2> <B>` exist? → Draw separate parallel edges for each predicate (edges may curve/offset to avoid complete overlap)
95
-
-**Blank nodes**: How are anonymous RDF nodes (e.g., `_:b1`) displayed? → Show with generated label ("_:b1") in unique yellow color to distinguish from literals and URIs
95
+
-**Blank nodes**: How are anonymous RDF nodes (e.g., `_:b1`) displayed? → Show with generated label ("_:b1") in unique orange color (#e15b13ff) to distinguish from literals and URIs
96
96
-**Self-referencing triples**: What happens when subject equals object (e.g., `<A> <related> <A>`)? → Display as loop edge from node to itself
97
97
-**No prefixes defined**: What happens when SPARQL results don't include prefix definitions? → Only show the part of the URI after last `/` or `#` as label
98
98
-**Large graphs (1000+ triples)**: How does the plugin handle performance with many nodes? → Initial layout completes within 2 seconds; warn user if exceeds rendering capacity
@@ -116,7 +116,7 @@ While exploring the graph, the user wants to see detailed information about node
116
116
117
117
-**FR-007**: Plugin MUST render graph using a force-directed or hierarchical layout algorithm that automatically spaces nodes to minimize edge crossings and overlaps
118
118
-**FR-008**: Plugin MUST complete initial graph layout within 2 seconds for graphs up to 1,000 nodes (performance target per constitution)
119
-
-**FR-009**: Plugin MUST apply color coding to nodes: grey (#808080) for literals, yellow (#FFFF00) for blank nodes, green (#00FF00) for nodes that are objects of `rdf:type` predicate, blue (#0000FF) for all other URI nodes
119
+
-**FR-009**: Plugin MUST apply color coding to nodes: light grey (#c5c5c5ff) for literals, orange (#e15b13ff) for blank nodes, light green (#a6c8a6ff) for nodes that are objects of `rdf:type` predicate, light blue (#97C2FC) for all other URI nodes
120
120
-**FR-010**: Plugin MUST label URI nodes with prefixed form (e.g., `ex:Person` instead of `http://example.org/Person`)
121
121
-**FR-010a**: Plugin MUST label blank nodes with their generated identifier (e.g., `_:b1`, `_:b2`)
122
122
-**FR-011**: Plugin MUST label literal nodes with the literal value only, excluding datatype suffix (e.g., `"John"` not `"John"^^xsd:string`)
@@ -150,7 +150,7 @@ While exploring the graph, the user wants to see detailed information about node
150
150
151
151
-**FR-028**: Plugin MUST display empty state message when CONSTRUCT query returns zero triples
152
152
-**FR-029**: Plugin MUST handle self-referencing triples (subject equals object) by rendering loop edges
153
-
-**FR-030**: Plugin MUST handle blank nodes by creating nodes with generated labels and yellow color
153
+
-**FR-030**: Plugin MUST handle blank nodes by creating nodes with generated labels and orange color (#e15b13ff)
154
154
-**FR-031**: Plugin MUST render multiple predicates between the same node pair as separate parallel edges with curved/offset paths
155
155
-**FR-032**: Plugin MUST truncate very long URI labels with ellipsis while preserving full URI in tooltips
156
156
-**FR-033**: Plugin MUST truncate literal labels exceeding ~50 characters while preserving full value in tooltips
@@ -159,7 +159,7 @@ While exploring the graph, the user wants to see detailed information about node
159
159
### Key Entities
160
160
161
161
-**GraphNode**: Represents either a subject or object from RDF triples
162
-
- Attributes: URI or literal value or blank node identifier, node type (URI/literal/blank), color (grey/yellow/green/blue), shape (uniform circle/ellipse), size (fixed), position (x, y coordinates), label (abbreviated form)
162
+
- Attributes: URI or literal value or blank node identifier, node type (URI/literal/blank), color (light grey/orange/light green/light blue), shape (uniform circle/ellipse), size (fixed), position (x, y coordinates), label (abbreviated form)
163
163
- Relationships: Connected to other nodes via edges (may have multiple edges with different predicates to same target)
164
164
165
165
-**GraphEdge**: Represents a predicate connecting two nodes
@@ -179,7 +179,7 @@ While exploring the graph, the user wants to see detailed information about node
179
179
### Measurable Outcomes
180
180
181
181
-**SC-001**: Users can visualize CONSTRUCT query results as graphs within 2 seconds of receiving results (for graphs up to 1,000 nodes)
182
-
-**SC-002**: Users can identify node types (literal vs. blank node vs. URI vs. type instance) through color coding without reading labels (grey/yellow/blue/green)
182
+
-**SC-002**: Users can identify node types (literal vs. blank node vs. URI vs. type instance) through color coding without reading labels (light grey/orange/light blue/light green)
183
183
-**SC-003**: Users can navigate graphs of any size by zooming and panning without performance degradation
184
184
-**SC-004**: Users can reorganize graph layouts manually to improve understanding of relationships
185
185
-**SC-005**: Users can access full URI details for any node or edge via hover tooltips
Copy file name to clipboardExpand all lines: specs/001-construct-graph-viz/tasks.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@
62
62
-[X] T020 [US1] Implement GraphPlugin.draw() method: clear this.yasr.resultsEl, parse triples via parseConstructResults(), extract prefixes via extractPrefixes(), transform via triplesToGraph()
63
63
-[X] T021 [US1] In GraphPlugin.draw(), create container div with 100% width/height, append to this.yasr.resultsEl
64
64
-[X] T022 [US1] In GraphPlugin.draw(), create vis.DataSet for nodes and edges, instantiate vis.Network with container, data, and options from getDefaultNetworkOptions()
65
-
-[X] T023 [US1] In GraphPlugin.draw(), handle stabilizationIterationsDone event to disable physics after layout completes (performance optimization per constitution)
65
+
-[X] T023 [US1] In GraphPlugin.draw(), handle stabilizationIterationsDone event to keep physics enabled after layout completes (can be disabled later if user feedback indicates performance issues)
66
66
-[X] T024 [US1] In GraphPlugin.draw(), add error handling to display empty state message if zero triples, or error message if parsing fails
67
67
-[X] T025 [US1] Handle blank nodes in createNodeMap(): detect _:b* identifiers, assign yellow color #FFFF00, generate label "_:b1" etc.
68
68
-[X] T026 [US1] Handle multiple predicates between same nodes in createEdgesArray(): create separate edge for each predicate, vis-network will curve them automatically
0 commit comments