Skip to content

Adds support for parsing and loading Sites #244 and Performances #243#261

Merged
jrmartin merged 9 commits intodevelopmentfrom
feature/test-f006
Jul 15, 2025
Merged

Adds support for parsing and loading Sites #244 and Performances #243#261
jrmartin merged 9 commits intodevelopmentfrom
feature/test-f006

Conversation

@jrmartin
Copy link
Copy Markdown
Collaborator

@jrmartin jrmartin commented Jul 15, 2025

Adds support for parsing and loading Sites #244 and Performances #243

This pull request introduces changes to improve the handling of hierarchical data structures and node relationships in the GraphViewerHelper.js and Splinter.js utilities. The updates enhance the logic for node separation, skip redundant processing, and ensure proper linking of tree and graph nodes.

Improvements to hierarchical data handling:

  • Adjusted node separation logic: Updated the dendrogram function in GraphViewerHelper.js to account for whether nodes are leaf nodes, applying different separation values based on their type. This change improves the visual representation of hierarchical relationships.

Enhancements to node processing and linking:

  • Avoid redundant processing for tree and graph nodes: Introduced logic in Splinter.js to skip processing folders that represent the same Subject/Sample node, while ensuring proper references between tree and graph nodes. This avoids unnecessary duplication and ensures consistency.
  • Handle missing parent or new nodes gracefully: Added checks in Splinter.js to skip processing when a parent node is missing or when a new node cannot be built. Existing nodes are linked to their parents, and child nodes are recursively linked to maintain the hierarchy.
  • Return undefined for existing nodes during node creation: Modified the buildNodeFromJson method in Splinter.js to return undefined for nodes already present in the proxies_map, ensuring no duplicate nodes are created.

@jrmartin jrmartin changed the title Adds support for parsing and loading Sites #243 and Performances #244 Adds support for parsing and loading Sites #244 and Performances #243 Jul 15, 2025
@jrmartin jrmartin requested a review from Copilot July 15, 2025 13:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Enhances hierarchical data rendering and node management to support parsing and loading Sites and Performances.

  • Adjusts dendrogram separation to differentiate leaf and non-leaf nodes.
  • Adds logic in Splinter.js to skip redundant Subject/Sample folder processing and properly link existing tree/graph nodes.
  • Updates buildNodeFromJson to return undefined for already-present nodes and handles missing parents gracefully.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/utils/Splinter.js Skip duplicate node creation, link existing nodes, return undefined for proxies and handle missing parents.
src/utils/GraphViewerHelper.js Modify dendrogram separation to use distinct spacing for leaf vs non-leaf nodes.
tests/f006/curation-export (6).ttl Add TTL fixture covering new Sites and Performances parsing scenarios.
Comments suppressed due to low confidence (2)

src/utils/GraphViewerHelper.js:188

  • There isn't a test verifying the new separation logic for leaf vs non-leaf nodes; adding a unit test to cover this behavior will ensure visual consistency in the dendrogram.
      const aIsLeaf = !a.children || a.children.length === 0;

src/utils/Splinter.js:1143

  • Ensure that proxies_map is indeed keyed by remote_id here—previously it used uri_api—as a mismatch could cause lookup failures.
        const node_id = this.proxies_map.get(item.remote_id);

@jrmartin jrmartin merged commit da90434 into development Jul 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants