Skip to content

Commit f0ad647

Browse files
committed
fix: stability popover can be overly wide
Signed-off-by: Nick Mitchell <[email protected]>
1 parent 1701882 commit f0ad647

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

pdl-live-react/src/view/masonry/MasonryTile.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,10 @@ function renderValue(
185185

186186
return (
187187
<Popover
188+
key={idx}
188189
hasAutoWidth
189-
maxWidth="500px"
190190
triggerAction="hover"
191+
className="pdl-masonry-tile-stability-popover"
191192
headerContent={detailHeader}
192193
bodyContent={
193194
<Stack hasGutter>
@@ -204,7 +205,10 @@ function renderValue(
204205
title="A/B Match"
205206
/>
206207
<Split hasGutter>
207-
<Panel isScrollable>
208+
<Panel
209+
isScrollable
210+
className="pdl-masonry-tile-stability-popover-ab-panel"
211+
>
208212
<PanelHeader>
209213
<Title headingLevel="h4">A</Title>
210214
</PanelHeader>
@@ -214,7 +218,10 @@ function renderValue(
214218
</PanelMainBody>
215219
</PanelMain>
216220
</Panel>
217-
<Panel isScrollable>
221+
<Panel
222+
isScrollable
223+
className="pdl-masonry-tile-stability-popover-ab-panel"
224+
>
218225
<PanelHeader>
219226
<Title headingLevel="h4">B</Title>
220227
</PanelHeader>

pdl-live-react/src/view/masonry/Stability.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@
3131
background-color: #c9190b;
3232
}
3333
}
34+
35+
.pdl-masonry-tile-stability-popover-ab-panel {
36+
max-width: 300px;
37+
}

pdl-live-react/src/view/masonry/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default function computeModel(block: import("../../pdl_ast").PdlBlock) {
8080
? capitalizeAndUnSnakeCase(String(meta[0][0]))
8181
: undefined,
8282
footer1Value: meta?.[0]?.[1] ? String(meta[0][1]) : undefined,
83-
footer2Key: hasSimilarityMetrics(block) ? "Stability" : undefined,
83+
footer2Key: hasSimilarityMetrics(block) ? "Idempotency" : undefined,
8484
footer2Value: hasSimilarityMetrics(block)
8585
? block.pdl__similarity
8686
: undefined,

0 commit comments

Comments
 (0)