From d6d5f4f219ca33d0de63fa1d12bdedf0dbde6a5d Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Fri, 23 Oct 2026 14:28:49 +0200 Subject: [PATCH 1/2] Categorize the virtual meetup as a meetup --- .../(main)/community/events/events-list.test.tsx | 13 +++++++++++++ src/app/(main)/community/events/events-list.tsx | 2 +- src/app/(main)/community/events/get-all-events.ts | 10 +++++----- .../[category]/category-working-groups.tsx | 10 +++++----- src/app/(main)/resources/[category]/page.tsx | 2 +- 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/app/(main)/community/events/events-list.test.tsx b/src/app/(main)/community/events/events-list.test.tsx index 8f134205d7..37efad27ce 100644 --- a/src/app/(main)/community/events/events-list.test.tsx +++ b/src/app/(main)/community/events/events-list.test.tsx @@ -18,4 +18,17 @@ describe(categorizeEvent.name, () => { assert.equal(categorizeEvent(event), "working-group") }) + + it("categorizes virtual meetups as meetups", () => { + const event = { + id: "virtual-meetup", + summary: "GraphQL Virtual Meetup", + start: "2026-12-08T18:00:00.000Z", + end: "2026-12-08T19:00:00.000Z", + htmlLink: "https://calendar.google.com/event?eid=virtual-meetup", + updated: "2026-10-20T15:13:22.000Z", + } satisfies CalendarEvent + + assert.equal(categorizeEvent(event), "meetup") + }) }) diff --git a/src/app/(main)/community/events/events-list.tsx b/src/app/(main)/community/events/events-list.tsx index eee20b3afe..cfb8d348af 100644 --- a/src/app/(main)/community/events/events-list.tsx +++ b/src/app/(main)/community/events/events-list.tsx @@ -96,7 +96,7 @@ export function categorizeEvent( return "foundation-meeting" } else if (/\bConference\s+Planning\b/i.test(summary)) { return "working-group" - } else if (/\bLocal\b/i.test(summary)) { + } else if (/\b(Local|Virtual\s+Meetup)\b/i.test(summary)) { return "meetup" } else if (/\bGraphQLConf[0-9]*\b/i.test(summary)) { // Handled elsewhere diff --git a/src/app/(main)/community/events/get-all-events.ts b/src/app/(main)/community/events/get-all-events.ts index f367ad996f..71b8b50f2a 100644 --- a/src/app/(main)/community/events/get-all-events.ts +++ b/src/app/(main)/community/events/get-all-events.ts @@ -8,13 +8,13 @@ import { events, type Event } from "./events" type AnyEvent = Event | CalendarEvent -const WORKING_GROUP_MEETINGS_FILE = join( +const CALENDAR_EVENTS_FILE = join( process.cwd(), "scripts/sync-calendar-events/calendar-events.ndjson", ) export const getAllEvents = cache(async () => { - const workingGroupMeetings = await loadWorkingGroupMeetings() + const workingGroupMeetings = await loadCalendarEvents() let pastEvents: AnyEvent[] = [] let upcomingEvents: AnyEvent[] = [] @@ -53,16 +53,16 @@ export const getAllEvents = cache(async () => { return { pastEvents, upcomingEvents } }) -export const loadWorkingGroupMeetings = cache(async () => { +export const loadCalendarEvents = cache(async () => { try { - const raw = (await readFile(WORKING_GROUP_MEETINGS_FILE, "utf8")).trim() + const raw = (await readFile(CALENDAR_EVENTS_FILE, "utf8")).trim() if (!raw) return [] return raw .split("\n") .filter(Boolean) .map(line => JSON.parse(line) as CalendarEvent) } catch (error) { - console.error("Failed to read working group meetings", error) + console.error("Failed to read calendar events", error) return [] } }) diff --git a/src/app/(main)/resources/[category]/category-working-groups.tsx b/src/app/(main)/resources/[category]/category-working-groups.tsx index cc9b19499a..bc543f5d07 100644 --- a/src/app/(main)/resources/[category]/category-working-groups.tsx +++ b/src/app/(main)/resources/[category]/category-working-groups.tsx @@ -1,7 +1,7 @@ import { clsx } from "clsx" import { EventCard } from "@/app/(main)/community/events/event-card" import { EventsScrollview } from "@/app/(main)/community/events/events-scrollview" -import { loadWorkingGroupMeetings } from "@/app/(main)/community/events/get-all-events" +import { loadCalendarEvents } from "@/app/(main)/community/events/get-all-events" import type { Topic } from "@/resources/types" import { categoriesConfig, sectionIds } from "./categories-config" @@ -19,17 +19,17 @@ export async function CategoryWorkingGroups({ if (!predicate) return null const { heading, text } = categoriesConfig[category].sections.event || {} - const meetings = await loadWorkingGroupMeetings() - const matchingMeetings = meetings.filter(predicate) + const calendarEvents = await loadCalendarEvents() + const matchingCalendarEvents = calendarEvents.filter(predicate) - const futureEvents = matchingMeetings.filter( + const futureEvents = matchingCalendarEvents.filter( event => new Date(event.start).getTime() >= Date.now(), ) const hasFutureEvents = futureEvents.length > 0 // soonest/most recent first - const events = hasFutureEvents ? futureEvents : matchingMeetings.reverse() + const events = hasFutureEvents ? futureEvents : matchingCalendarEvents.reverse() if (events.length === 0) return null diff --git a/src/app/(main)/resources/[category]/page.tsx b/src/app/(main)/resources/[category]/page.tsx index 3cf049893b..9e6111abb3 100644 --- a/src/app/(main)/resources/[category]/page.tsx +++ b/src/app/(main)/resources/[category]/page.tsx @@ -26,7 +26,7 @@ import { DocsSection } from "./docs-section" import { LookingForMore } from "@/components/looking-for-more" import { unsafeKeys } from "@/app/conf/_design-system/utils/unsafe-keys" import { CategoryWorkingGroups } from "./category-working-groups" -import { loadWorkingGroupMeetings } from "../../community/events/get-all-events" +import { loadCalendarEvents } from "../../community/events/get-all-events" interface PageParams { category: string From 3e4e805c92f0c9484af9a54fdf14528970686dbc Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Fri, 23 Oct 2026 14:32:42 +0200 Subject: [PATCH 2/2] format --- .../(main)/resources/[category]/category-working-groups.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/(main)/resources/[category]/category-working-groups.tsx b/src/app/(main)/resources/[category]/category-working-groups.tsx index bc543f5d07..9a94311186 100644 --- a/src/app/(main)/resources/[category]/category-working-groups.tsx +++ b/src/app/(main)/resources/[category]/category-working-groups.tsx @@ -29,7 +29,9 @@ export async function CategoryWorkingGroups({ const hasFutureEvents = futureEvents.length > 0 // soonest/most recent first - const events = hasFutureEvents ? futureEvents : matchingCalendarEvents.reverse() + const events = hasFutureEvents + ? futureEvents + : matchingCalendarEvents.reverse() if (events.length === 0) return null