({ node }: { node: GraphNode })
| 60 | } |
| 61 | |
| 62 | export function NodeTooltipCard({ node }: { node: GraphNode }): JSX.Element { |
| 63 | const rows = tooltipRows(node); |
| 64 | const lines = lineRangeOf(node); |
| 65 | // Round 4 (N1): a Branch node shows what it is, its name in the index stands where a file would, and "{}" is no file. |
| 66 | const file = nodeFilePath(node); |
| 67 | const indexName = graphNodeIndexName(node); |
| 68 | return ( |
| 69 | /* Review zu K29: in der Ebene der Hover-Karten, ueber den Flaechen der Galaxie (hover-layer.tsx). */ |
| 70 | <HoverCardHtml position={[node.x, node.y + node.size * 0.7, node.z]}> |
| 71 | <div className="atlas-galaxy-card" data-testid="atlas-galaxy-card"> |
| 72 | <div className="atlas-galaxy-card-head"> |
| 73 | <span className="atlas-galaxy-card-dot" style={{ backgroundColor: node.color }} /> |
| 74 | <span className="atlas-galaxy-card-name">{graphNodeName(node)}</span> |
| 75 | <span className="atlas-galaxy-card-label">{node.label}</span> |
| 76 | </div> |
| 77 | {indexName !== undefined && <p className="atlas-galaxy-card-path">{indexName}</p>} |
| 78 | {file !== undefined && file.length > 0 && ( |
| 79 | <p className="atlas-galaxy-card-path"> |
| 80 | {file} |
| 81 | {lines.length > 0 && <span className="atlas-galaxy-card-lines"> {lines}</span>} |
| 82 | </p> |
| 83 | )} |
| 84 | {rows.length > 0 && ( |
| 85 | <dl className="atlas-galaxy-card-rows"> |
| 86 | {rows.map(([label, value]) => ( |
| 87 | <div key={label} className="atlas-galaxy-card-row"> |
| 88 | <dt>{label}</dt> |
| 89 | <dd>{value}</dd> |
| 90 | </div> |
| 91 | ))} |
| 92 | </dl> |
| 93 | )} |
| 94 | {node.status !== undefined && node.status !== 'structural' && ( |
| 95 | <p className="atlas-galaxy-card-status">{node.status}</p> |
| 96 | )} |
| 97 | <p className="atlas-galaxy-card-action">{tooltipAction(node)}</p> |
| 98 | </div> |
| 99 | </HoverCardHtml> |
| 100 | ); |
| 101 | } |
| 102 | |
| 103 | export default NodeTooltipCard; |
nothing calls this directly
no test coverage detected