fix: long subheadline overflowing listview
This commit is contained in:
@@ -22,7 +22,6 @@ import {
|
|||||||
import { getInitials } from "@/lib/utils";
|
import { getInitials } from "@/lib/utils";
|
||||||
import { formatDistanceToNow } from "@/lib/time-utils";
|
import { formatDistanceToNow } from "@/lib/time-utils";
|
||||||
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
|
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import { Progress } from "@/components/ui/progress";
|
import { Progress } from "@/components/ui/progress";
|
||||||
import { Small } from "@/components/ui/typography";
|
import { Small } from "@/components/ui/typography";
|
||||||
@@ -133,10 +132,12 @@ function StreamRow({
|
|||||||
const TypeIcon = latestChild ? getParticleTypeIcon(latestChild) : Radio;
|
const TypeIcon = latestChild ? getParticleTypeIcon(latestChild) : Radio;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<div
|
||||||
type="button"
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
className="flex w-full items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-accent"
|
onKeyDown={(e) => { if (e.key === "Enter" || e.key === " ") onClick(); }}
|
||||||
|
className="flex w-full items-center gap-3 px-4 py-3 text-left cursor-pointer transition-colors hover:bg-accent"
|
||||||
>
|
>
|
||||||
<Avatar
|
<Avatar
|
||||||
className={cn(isUnseen && "ring-2 ring-primary")}
|
className={cn(isUnseen && "ring-2 ring-primary")}
|
||||||
@@ -193,7 +194,7 @@ function StreamRow({
|
|||||||
{isUnseen && (
|
{isUnseen && (
|
||||||
<span className="size-2 shrink-0 rounded-full bg-primary" />
|
<span className="size-2 shrink-0 rounded-full bg-primary" />
|
||||||
)}
|
)}
|
||||||
</button>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +240,7 @@ export function ParticleListView({ path }: ParticleListViewProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-full">
|
<div className="h-full overflow-clip">
|
||||||
<div className="py-1">
|
<div className="py-1">
|
||||||
{streams.map((stream, index) => (
|
{streams.map((stream, index) => (
|
||||||
<div key={stream.id}>
|
<div key={stream.id}>
|
||||||
@@ -252,6 +253,6 @@ export function ParticleListView({ path }: ParticleListViewProps) {
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</ScrollArea>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user