Skip to content

Commit 9929738

Browse files
feat(note-header): Improve participants and event chips (#676)
1 parent ddea82a commit 9929738

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

apps/desktop/src/components/editor-area/note-header/chips/event-chip.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { useHypr } from "@/contexts";
66
import { commands as dbCommands } from "@hypr/plugin-db";
77
import { Button } from "@hypr/ui/components/ui/button";
88
import { Popover, PopoverContent, PopoverTrigger } from "@hypr/ui/components/ui/popover";
9+
import { cn } from "@hypr/ui/lib/utils";
910
import { useSession } from "@hypr/utils/contexts";
1011
import { formatRelativeWithDay } from "@hypr/utils/datetime";
1112

@@ -30,12 +31,18 @@ export function EventChip({ sessionId }: EventChipProps) {
3031
return (
3132
<Popover>
3233
<PopoverTrigger disabled={!event.data || onboardingSessionId === sessionId}>
33-
<div className="flex flex-row items-center gap-2 rounded-md px-2 py-1.5 hover:bg-neutral-100">
34+
<div
35+
className={cn(
36+
"flex flex-row items-center gap-2 rounded-md px-2 py-1.5 hover:bg-neutral-100",
37+
!event.data && "opacity-50 cursor-not-allowed",
38+
onboardingSessionId === sessionId && "opacity-50 cursor-not-allowed",
39+
)}
40+
>
3441
<CalendarIcon size={14} />
3542
<p className="text-xs">{formatRelativeWithDay(date)}</p>
3643
</div>
3744
</PopoverTrigger>
38-
<PopoverContent align="start" className="shadow-lg">
45+
<PopoverContent align="start" className="shadow-lg w-72">
3946
<div className="flex flex-col gap-2">
4047
<div className="font-semibold">{event.data?.name}</div>
4148
<div className="text-sm text-neutral-600">{event.data?.note}</div>

apps/desktop/src/components/editor-area/note-header/chips/participants-chip/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function ParticipantsChip({ sessionId }: ParticipantsChipProps) {
5454
</div>
5555
</PopoverTrigger>
5656

57-
<PopoverContent className="shadow-lg" align="start">
57+
<PopoverContent className="shadow-lg w-80" align="start">
5858
<ParticipantsList sessionId={sessionId} />
5959
</PopoverContent>
6060
</Popover>

apps/desktop/src/components/editor-area/note-header/chips/participants-chip/participants-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function ParticipantsList({ sessionId }: ParticipantsListProps) {
4848
}
4949

5050
return (
51-
<div className="flex flex-col gap-3 max-w-[450px]">
51+
<div className="flex flex-col gap-3">
5252
<div className="text-sm font-medium text-neutral-700">Participants</div>
5353

5454
<div className="flex flex-col gap-4 max-h-[40vh] overflow-y-auto custom-scrollbar pr-1">

0 commit comments

Comments
 (0)