Fix Upcoming card height — use natural height with scroll cap
The flex-col h-full layout caused the card to stretch to match the grid row, pushing content beyond the ScrollArea max-height. Switched to natural card height with max-h-[400px] on ScrollArea so the card stays compact and scrolls internally without mismatching the right column cards. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
076b2fc3c9
commit
27a5002c74
@ -174,7 +174,7 @@ export default function UpcomingWidget({ items }: UpcomingWidgetProps) {
|
|||||||
const dayEntries = Array.from(grouped.entries());
|
const dayEntries = Array.from(grouped.entries());
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="flex flex-col h-full">
|
<Card className="h-full">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<CardTitle className="flex items-center gap-2">
|
<CardTitle className="flex items-center gap-2">
|
||||||
@ -210,13 +210,13 @@ export default function UpcomingWidget({ items }: UpcomingWidgetProps) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="flex-1 min-h-0 flex flex-col" style={{ minHeight: 200 }}>
|
<CardContent>
|
||||||
{filteredCount === 0 ? (
|
{filteredCount === 0 ? (
|
||||||
<p className="text-sm text-muted-foreground text-center py-8">
|
<p className="text-sm text-muted-foreground text-center py-8">
|
||||||
{focusMode ? 'Nothing for today or tomorrow' : 'Nothing upcoming'}
|
{focusMode ? 'Nothing for today or tomorrow' : 'Nothing upcoming'}
|
||||||
</p>
|
</p>
|
||||||
) : (
|
) : (
|
||||||
<ScrollArea className="flex-1 max-h-[400px]">
|
<ScrollArea className="max-h-[400px] -mr-2 pr-2">
|
||||||
<div>
|
<div>
|
||||||
{dayEntries.map(([dateKey, dayItems], groupIdx) => {
|
{dayEntries.map(([dateKey, dayItems], groupIdx) => {
|
||||||
const isCollapsed = collapsedDays.has(dateKey);
|
const isCollapsed = collapsedDays.has(dateKey);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user