From 00a71324ea91ffb3cfdc2174564da90d232771ef Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Thu, 14 May 2026 13:15:56 +0200 Subject: [PATCH] more ui tweaks --- .../src/pages/target-history-version-new.tsx | 98 +++++++++++-------- 1 file changed, 57 insertions(+), 41 deletions(-) diff --git a/packages/web/app/src/pages/target-history-version-new.tsx b/packages/web/app/src/pages/target-history-version-new.tsx index c5b6afcd9..1d65b93d3 100644 --- a/packages/web/app/src/pages/target-history-version-new.tsx +++ b/packages/web/app/src/pages/target-history-version-new.tsx @@ -338,7 +338,7 @@ function SchemaVersionView(props: SchemaVersionViewProps) { - Contract composition failed. + Composition failed. )} @@ -429,36 +429,48 @@ function SchemaVersionView(props: SchemaVersionViewProps) { )} )} - {selectedView === 'full-schema' && ( - edge.node) ?? null} - currentSdl={contractOrVersion.sdl ?? ''} - previousSdl={contractOrVersion.previousDiffableVersion?.sdl ?? null} - fromName={ - contractOrVersion.previousDiffableVersion - ? `schema@${contractOrVersion.previousDiffableVersion.id.substring(0, 8)}` - : null - } - toName={`schema@${contractOrVersion.id.substring(0, 8)}`} - /> - )} - {selectedView === 'supergraph' && ( - edge.node) ?? null} - currentSdl={contractOrVersion.supergraphSdl ?? ''} - previousSdl={contractOrVersion.previousDiffableVersion?.supergraphSdl ?? null} - fromName={ - contractOrVersion.previousDiffableVersion - ? `supergraph@${contractOrVersion.previousDiffableVersion.id.substring(0, 8)}` - : null - } - toName={`supergraph@${schemaVersion.id.substring(0, 8)}`} - /> - )} + {selectedView === 'full-schema' && + (contractOrVersion.schemaCompositionErrors ? ( + <> + +

No schema available as the composition did not succeed.

+ + ) : ( + edge.node) ?? null} + currentSdl={contractOrVersion.sdl ?? ''} + previousSdl={contractOrVersion.previousDiffableVersion?.sdl ?? null} + fromName={ + contractOrVersion.previousDiffableVersion + ? `schema@${contractOrVersion.previousDiffableVersion.id.substring(0, 8)}` + : null + } + toName={`schema@${contractOrVersion.id.substring(0, 8)}`} + /> + ))} + {selectedView === 'supergraph' && + (contractOrVersion.schemaCompositionErrors ? ( + <> + +

No supergraph available as the composition did not succeed.

+ + ) : ( + edge.node) ?? null} + currentSdl={contractOrVersion.supergraphSdl ?? ''} + previousSdl={contractOrVersion.previousDiffableVersion?.supergraphSdl ?? null} + fromName={ + contractOrVersion.previousDiffableVersion + ? `supergraph@${contractOrVersion.previousDiffableVersion.id.substring(0, 8)}` + : null + } + toName={`supergraph@${schemaVersion.id.substring(0, 8)}`} + /> + ))} {selectedView === 'service-schema' && schemaVersion.subgraphDiffs && ( )} @@ -638,13 +650,17 @@ function GraphVersionSubgraphView(props: { diff={diff} renderChildren={() => (
- edge.node) ?? []} - projectSlug="" - organizationSlug="" - schemaCheckId="" - targetSlug="" - /> + {diff.changes ? ( + edge.node) ?? []} + projectSlug="" + organizationSlug="" + schemaCheckId="" + targetSlug="" + /> + ) : ( +
No changes available.
+ )}
)} /> @@ -1369,8 +1385,8 @@ export const GraphVersionSummary = (props: { - - + + {publicChangeStats.breakingChanges} not safe @@ -1403,7 +1419,7 @@ export const GraphVersionSummary = (props: {
- Subgraph Change Overview + Subgraph Overview