Skip to content

Commit

Permalink
Revert to nullable displayId
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcginnes committed Dec 6, 2024
1 parent 465ab32 commit b541601
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions packages/graph-explorer/src/core/StateProvider/displayEdge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ import {
export type DisplayEdge = {
entityType: "edge";
id: EdgeId;
displayId: string;
displayId: string | null;
displayName: string;
displayTypes: string;
typeConfig: DisplayEdgeTypeConfig;
source: EdgeVertex;
target: EdgeVertex;
attributes: DisplayAttribute[];
hasUniqueId: boolean;
};

type EdgeVertex = {
Expand Down Expand Up @@ -82,7 +81,7 @@ const displayEdgeSelector = selectorFamily({
.join(", ");

// For SPARQL, display the edge type as the ID
const displayId = isSparql ? displayTypes : edge.id;
const displayId = isSparql ? null : edge.id;

const typeAttributes = get(vertexTypeAttributesSelector(edgeTypes));
const sortedAttributes = getSortedDisplayAttributes(
Expand Down Expand Up @@ -153,8 +152,6 @@ const displayEdgeSelector = selectorFamily({
displayTypes: targetDisplayTypes,
},
attributes: sortedAttributes,
// SPARQL does not have unique ID values for predicates, so the UI should hide them
hasUniqueId: isSparql === false,
};
return displayEdge;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const EdgeDetail = ({ edge }: EdgeDetailProps) => {
</div>
<div className={"content"}>
<div className={"title"}>{edge.displayTypes}</div>
{edge.hasUniqueId ? <div>{edge.displayId}</div> : null}
{edge.displayId ? <div>{edge.displayId}</div> : null}
</div>
</div>
<div className={cn("header", "source-vertex")}>
Expand Down

0 comments on commit b541601

Please sign in to comment.