Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

✨ Show conferencing and a Join link on the events list (#3402)

Luke Vellab06c36cab12f
diff --git a/apps/web/src/app/[locale]/(space)/(dashboard)/events/events-infinite-list.tsx b/apps/web/src/app/[locale]/(space)/(dashboard)/events/events-infinite-list.tsx
index eaf162935..e5a6b88c8 100644
--- a/apps/web/src/app/[locale]/(space)/(dashboard)/events/events-infinite-list.tsx
+++ b/apps/web/src/app/[locale]/(space)/(dashboard)/events/events-infinite-list.tsx
@@ -14,6 +14,8 @@ import { DataList } from "@/components/data-list";
import { ListViewContent } from "@/components/list-view";
import { OptimizedAvatarImage } from "@/components/optimized-avatar-image";
import { Spinner } from "@/components/spinner";
+import { EventConferencingSummary } from "@/features/conferencing/components/event-conferencing-summary";
+import type { Conferencing } from "@/features/conferencing/schema";
import { EventTimeRange } from "@/features/scheduled-event/components/event-date-time";
import { ScheduledEventRowActions } from "@/features/scheduled-event/components/scheduled-event-row";
import type {
@@ -39,6 +41,7 @@ type EventRow = {
end: DateInput;
allDay: boolean;
timeZone: string | null;
+ conferencing: Conferencing | null;
invites: { id: string }[];
createdBy: { name: string; image?: string };
};
@@ -74,6 +77,22 @@ const columns = [
</span>
),
}),
+ columnHelper.accessor("conferencing", {
+ header: () => <Trans i18nKey="conferencing" defaults="Conferencing" />,
+ meta: {
+ className:
+ "hidden gap-1.5 whitespace-nowrap text-muted-foreground text-sm lg:flex [&_svg]:size-4 [&_svg]:shrink-0",
+ },
+ cell: ({ row, getValue }) => {
+ const conferencing = getValue();
+ return conferencing ? (
+ <EventConferencingSummary
+ conferencing={conferencing}
+ joinable={row.original.status !== "canceled"}
+ />
+ ) : null;
+ },
+ }),
columnHelper.accessor((event) => event.invites.length, {
id: "attendees",
header: () => <Trans i18nKey="eventsListAttendees" defaults="Attendees" />,
@@ -307,7 +326,7 @@ export function EventsInfiniteList({
),
};
}}
- className="grid-cols-[auto_minmax(0,1fr)_auto] sm:grid-cols-[auto_minmax(0,1fr)_auto_auto_auto]"
+ className="grid-cols-[auto_minmax(0,1fr)_auto] sm:grid-cols-[auto_minmax(0,1fr)_auto_auto_auto] lg:grid-cols-[auto_minmax(0,1fr)_auto_auto_auto_auto]"
/>
{hasNextPage && (
<div ref={loadMoreRef} className="flex justify-center py-4">
diff --git a/apps/web/src/features/conferencing/components/event-conferencing-summary.tsx b/apps/web/src/features/conferencing/components/event-conferencing-summary.tsx
new file mode 100644
index 000000000..c68fbd9fd
--- /dev/null
+++ b/apps/web/src/features/conferencing/components/event-conferencing-summary.tsx
@@ -0,0 +1,52 @@
+"use client";
+
+import { PhoneIcon } from "lucide-react";
+import { PollConferencingSummary } from "@/features/conferencing/components/poll-conferencing-summary";
+import type { Conferencing } from "@/features/conferencing/schema";
+import { getConferencingUri } from "@/features/conferencing/utils";
+
+// The meeting a scheduled event carries. A canceled event keeps its provider
+// but drops the join link: the meeting may no longer exist.
+export function EventConferencingSummary({
+ conferencing,
+ joinable = true,
+}: {
+ conferencing: Conferencing;
+ joinable?: boolean;
+}) {
+ if (conferencing.provider === "phone") {
+ return (
+ <>
+ <PhoneIcon />
+ {joinable ? (
+ <a href={getConferencingUri(conferencing)} className="text-link">
+ {conferencing.number}
+ </a>
+ ) : (
+ <span>{conferencing.number}</span>
+ )}
+ </>
+ );
+ }
+
+ const joinUri = joinable ? conferencing.uri : null;
+
+ if (conferencing.provider === "custom") {
+ return (
+ <PollConferencingSummary
+ conferencing={{
+ provider: "custom",
+ label: conferencing.label,
+ uri: joinUri ?? undefined,
+ }}
+ />
+ );
+ }
+
+ return (
+ <PollConferencingSummary
+ conferencing={{ provider: conferencing.provider }}
+ meetingUri={joinUri}
+ />
+ );
+}