Skip to content

Commit 6dd78ac

Browse files
authored
Fix selected parameter card long name overflow (#1087)
* Line wrap chart title * Improve card layout * Fix an old comment
1 parent 80c702d commit 6dd78ac

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

gcs/src/components/fla/chartDataCard.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,14 @@ function ChartDataCard({ item, unit, messageMeans }) {
7575
<div className="inline-flex flex-col items-center gap-2 px-2 py-2 mr-3 text-xs font-bold text-white border border-gray-700 rounded-lg bg-grey-200">
7676
{/* Title and Delete Button */}
7777
<div className="inline-flex items-center content-center justify-between w-full">
78-
<p className="text-md">
78+
<p className="text-md flex-1 min-w-0 break-words">
7979
{item.label} <span className="text-gray-400">({unit})</span>
8080
</p>
8181
<ActionIcon
8282
variant="subtle"
8383
color={"red"}
8484
onClick={() => removeDataset(item.label)}
85+
className="self-start"
8586
>
8687
<IconTrash size={18} />
8788
</ActionIcon>
@@ -100,8 +101,8 @@ function ChartDataCard({ item, unit, messageMeans }) {
100101
onChangeEnd={(color) => changeColor(item.label, color)}
101102
/>
102103

103-
{/* Min, max, min */}
104-
<Box className="w-full text-gray-400">
104+
{/* Min, max, mean */}
105+
<Box className="w-full text-gray-400 mt-auto">
105106
Min: {messageMeans[item.label]?.min}, Max:{" "}
106107
{messageMeans[item.label]?.max}, Mean: {messageMeans[item.label]?.mean}
107108
</Box>

gcs/src/components/fla/mainDisplay.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export default function MainDisplay({ closeLogFile, chartData, customColors }) {
180180
className="min-h-0 h-full pb-4"
181181
>
182182
<ScrollArea className="h-full">
183-
<div className="grid grid-cols-6 gap-2 py-2">
183+
<div className="grid grid-cols-3 lg:grid-cols-4 2xl:grid-cols-6 gap-2 py-2">
184184
{chartData.datasets.map((item) => (
185185
<Fragment key={item.label}>
186186
<ChartDataCard

0 commit comments

Comments
 (0)