From 34cbbcc7d65b57df9dfcbd27d4b865c68be35ed3 Mon Sep 17 00:00:00 2001 From: Cyber Preacher <72062250+Cyber-preacher@users.noreply.github.com> Date: Wed, 24 Jun 2026 14:56:06 +0400 Subject: [PATCH] Fix proposal card pill overflow --- src/components/Chip.tsx | 13 ++++++++++--- src/components/GlassyRecordCard.css | 11 +++++++++-- src/components/StageChip.css | 13 +++++++++++++ src/components/StageChip.tsx | 7 ++++++- 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/components/Chip.tsx b/src/components/Chip.tsx index 068140e..1660602 100644 --- a/src/components/Chip.tsx +++ b/src/components/Chip.tsx @@ -5,17 +5,24 @@ import { cn } from "@/lib/utils"; type ChipProps = { children: ReactNode; className?: string; + title?: string; }; -export function Chip({ children, className }: ChipProps) { +export function Chip({ children, className, title }: ChipProps) { + const resolvedTitle = + title ?? (typeof children === "string" ? children : undefined); + return ( - {children} + + {children} + ); } diff --git a/src/components/GlassyRecordCard.css b/src/components/GlassyRecordCard.css index 054fce6..de247ca 100644 --- a/src/components/GlassyRecordCard.css +++ b/src/components/GlassyRecordCard.css @@ -87,7 +87,7 @@ .glassy-record-card__button { display: grid; width: 100%; - grid-template-columns: minmax(0, 1fr) 30rem; + grid-template-columns: minmax(0, 1fr) minmax(28rem, 31rem); gap: 1rem; border: 0; background: transparent; @@ -117,7 +117,9 @@ .glassy-record-card__aside { display: grid; - grid-template-columns: 8.75rem 8.75rem 8.75rem 1.25rem; + grid-template-columns: + minmax(0, 10rem) minmax(0, 8.75rem) minmax(0, 7.75rem) + 1.25rem; align-items: center; justify-content: end; gap: 0.65rem; @@ -128,6 +130,7 @@ } .glassy-record-card__metaPill { + min-width: 0; width: 100%; justify-content: center; color: var(--record-meta-text); @@ -157,12 +160,16 @@ } .glassy-record-card__stage { + min-width: 0; width: 100%; justify-content: center; white-space: nowrap; } .glassy-record-card__time { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; color: var(--record-time-text); font-size: 0.72rem; white-space: nowrap; diff --git a/src/components/StageChip.css b/src/components/StageChip.css index f42cdd4..6526608 100644 --- a/src/components/StageChip.css +++ b/src/components/StageChip.css @@ -1,9 +1,22 @@ .stage-chip { + max-width: 100%; + min-width: 0; border: 1px solid var(--stage-chip-border); background: var(--stage-chip-bg); color: var(--stage-chip-text); } +.stage-chip .hint-trigger, +.stage-chip .hint-trigger > span, +.stage-chip .hint-underline { + min-width: 0; + max-width: 100%; + overflow: hidden; + color: inherit; + text-overflow: ellipsis; + white-space: nowrap; +} + .stage-chip--proposal-pool { --stage-chip-bg: #fff1dc; --stage-chip-border: rgba(176, 102, 25, 0.2); diff --git a/src/components/StageChip.tsx b/src/components/StageChip.tsx index 250fb3d..a68709f 100644 --- a/src/components/StageChip.tsx +++ b/src/components/StageChip.tsx @@ -41,9 +41,14 @@ export function StageChip({ stage, label, className }: StageChipProps) { const kind: StageChipKind = stageChipKindForStage(stage); const termId = hintByKind[kind]; const content = label ?? stageLabelForStage(stage); + const title = + typeof content === "string" ? content : stageLabelForStage(stage); return ( - + {termId ? {content} : content} );