mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-12 14:14:50 +00:00
fix(ui): wrap long source-card titles instead of overflowing under the menu
A long underscore-heavy filename (no natural break points) overflowed the card toward the 3-dots menu: the title <h3> was a flex item without min-w-0, so it couldn't shrink below its min-content width, and wrap-break-word doesn't reduce flex min-content. Add min-w-0 flex-1 + wrap-anywhere on the title and shrink-0 on the menu column so the title shrinks, breaks anywhere, and stays left of the menu (still line-clamp-3).
This commit is contained in:
1 parent
91d17694b3
commit
92e64cc192
1 file changed
+2
-2
@@ -639,12 +639,12 @@ export default function Sources({
|
||||
<div className="w-full flex-1">
|
||||
<div className="flex w-full items-center justify-between gap-2">
|
||||
<h3
|
||||
className="dark:text-foreground text-foreground line-clamp-3 text-sm leading-[18px] font-semibold wrap-break-word"
|
||||
className="dark:text-foreground text-foreground line-clamp-3 min-w-0 flex-1 text-sm leading-[18px] font-semibold wrap-anywhere"
|
||||
title={document.name}
|
||||
>
|
||||
{document.name}
|
||||
</h3>
|
||||
<div className="relative flex items-center justify-end">
|
||||
<div className="relative flex shrink-0 items-center justify-end">
|
||||
{document.syncFrequency && (
|
||||
<DropdownMenu
|
||||
open={
|
||||
|
||||
Reference in new issue
Block a user