aws/graph-explorer

Blank nodes show no icon on graph canvas but display default icon in details panel

開放

#1,779 建立於 2026年5月22日

 (2 則留言) (0 個反應) (1 位負責人)TypeScript (88 個分叉)auto 404
customizationexplorationgood first issuehelp wantedsparql

倉庫指標

星標
 (456 顆星)
PR 合併指標
 (平均合併 3天 9小時) (30 天內合併 41 個 PR)

描述

Description

When a blank node (bnode) with no type is rendered on the graph canvas, it has no icon. However, when the same node is selected, the details/properties panel shows the default icon. The icon display should be consistent between the two views.

The root cause is that the canvas icon rendering path (useBackgroundImageMap) only creates Cytoscape style selectors for vertex types that exist in the schema. Since "«No Type»" is a synthetic label assigned at runtime (vertex.ts:80-83) and isn't in the schema, no icon style is generated. The details panel uses useVertexPreferences() which always falls back to DEFAULT_ICON_URL regardless of schema presence.

Relevant code paths

  • Canvas: useGraphStylesuseBackgroundImageMaprenderNode (skips types not in schema)
  • Panel: VertexIconuseVertexPreferences → always returns defaultVertexPreferences.iconUrl

Environment

  • Graph Database & Version: Any SPARQL endpoint with blank nodes

Steps to Reproduce

  1. Load a graph containing a blank node (e.g., a bnode used as an address object)
  2. Observe the bnode on the canvas — no icon, just the "«No Type»" label
  3. Select the bnode and open the properties panel
  4. The default icon appears in the panel header but not on the canvas node

Expected Behavior

The blank node should display the same default icon on both the canvas and the details panel.


[!IMPORTANT] If you are interested in working on this issue, please leave a comment.

[!TIP] Please use a 👍 reaction to provide a +1/vote. This helps the community and maintainers prioritize this request.

貢獻者指南