Enable domain visualization on graph explorer#2810
Enable domain visualization on graph explorer#2810peeterskris wants to merge 14 commits intoconveyordata:mainfrom
Conversation
Activate the existing but disabled domain container node infrastructure in the Explorer view. Synthesizes domain parent nodes from the domain_id and domain fields already returned by the API, assigns each domain a distinct transparent color, and passes domainsEnabled through so child nodes are nested inside their domain boxes via parentId. Also keeps domain containers visible during node selection highlighting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set elk.hierarchyHandling to INCLUDE_CHILDREN on both inter- and intra- domain layout options so cross-domain edges influence the global left-to- right layering. Also align the inter-domain options with the same quality settings (NETWORK_SIMPLEX, LAYER_SWEEP, FIXED_SIDE ports) used by the basic layout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@peeterskris thank you for the contribution, however you have missed a few things by overriding our PR template. We have the following checks:
Can you please ensure you do both of these :) Also a heads up, we are planning to improve this explorer view at some point. We are looking into what people actually want to achieve with this page, and what the job to be done is. If you can share what you do with this page, kindly let us know. It would be a ton of help! Another annoying issue with the change here is that we had a couple of problems with the domain nodes in the past. TODOs:
|
The sidebar gets setNodes directly from useReactFlow(), so passing it as a prop from the parent was redundant and caused a TypeScript shadow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a Switch control that sets domainsEnabled in SidebarFilters, allowing users to show/hide domain container boxes. The plumbing was already in place; this adds the missing UI control. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backend: extend graph router tests to verify domain_id and domain fields are populated on data product and output port nodes, and that multiple domains are correctly distinguished. Frontend: add node-parser.helper tests covering the domainsEnabled flag — parentId is set when enabled and domain_id is present, and absent otherwise. Also fix TypeScript error (setNodes still passed as prop after removal) and add missing 'Show Domains' translation key. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- node-parser.helper.test.ts: replace 'as any' cast with proper Node type and NodeType enum from the generated graph API types - node-editor.tsx: remove redundant fragment wrapping single ReactFlow child Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Importing NodeType enum from graphApi transitively loads the Redux store which calls AppConfig.getApiBaseURL() and crashes in the Node test env. Use a biome-ignore suppression on the as-any cast in the test factory instead, which is the right trade-off for a pure test helper. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
'import type' is erased at compile time so it does not trigger the Redux store chain that reads AppConfig.getApiBaseURL(). Use string literal cast to satisfy the NodeType enum field without importing the enum value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-visualization-explorer # Conflicts: # docs/docs/release-notes.md
stijn-janssens
left a comment
There was a problem hiding this comment.
I like it! An idea: Can we show the domains as coloured borders around nodes when domains are disabled? To give a sense of grouping at least without showing the groups themselves? Or is that overkill and do we want disabled domains to actually mean "no domains visible at all"?
|
|
||
| function parseFullNodes(nodes: GraphNode[], setNodeId: (id: string) => void): Node[] { | ||
| const DOMAIN_COLORS = [ | ||
| { bg: 'rgba(59, 130, 246, 0.08)', border: 'rgba(59, 130, 246, 0.3)' }, // blue |
There was a problem hiding this comment.
Fine for now, but maybe this should be logged as tech debt as this both hardcodes the colors and will recycle them after 8 domains.
There was a problem hiding this comment.
We already use antv from ant design, I believe there might be a colorpallette there. I will look into it and respond here again.
There was a problem hiding this comment.
tests should be placed in the tests folder
There was a problem hiding this comment.
No in front end testing, it is preferred to place it next to the component
There was a problem hiding this comment.
:o that feels weird :D But okay! Learned something new
- Move node-parser.helper.test.ts to src/tests/ folder per project convention - Add aspect ratio and component compaction to ELK inter-domain layout to reduce excessive vertical stacking when domains are enabled Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| assert edge["target"] == str(consumer.id), ( | ||
| "Edge target should be the consumer (dataset reader)" | ||
| ) | ||
|
|
There was a problem hiding this comment.
I am unsure what the tests add to be honest, the logic did not change? So unsure why they are required. Can you explain to me the reasoning for adding these?
The includes domain fields tests for example could just be the last 2 asserts that are added to test_get_graph_data.
|
|
||
| function parseFullNodes(nodes: GraphNode[], setNodeId: (id: string) => void): Node[] { | ||
| const DOMAIN_COLORS = [ | ||
| { bg: 'rgba(59, 130, 246, 0.08)', border: 'rgba(59, 130, 246, 0.3)' }, // blue |
There was a problem hiding this comment.
We already use antv from ant design, I believe there might be a colorpallette there. I will look into it and respond here again.
There was a problem hiding this comment.
No in front end testing, it is preferred to place it next to the component





Summary
domain_idanddomainfields already returned by the API, assigning each domain a distinct transparent color from an 8-color palettedomainsEnabledthrough toparseRegularNodeso child nodes are nested inside their domain boxes viaparentIdTest plan
🤖 Generated with Claude Code