Skip to content

Add date, time, and location to event schema and display - #149

Open
silaselisha wants to merge 1 commit into
seattlejs:mainfrom
silaselisha:enhancement/event-display
Open

silaselisha wants to merge 1 commit into
seattlejs:mainfrom
silaselisha:enhancement/event-display

Conversation

@silaselisha

Copy link
Copy Markdown

Closes #127

What this changes

Schema (src/data/types.d.ts): adds optional fields to SJSEvent:

  • startTime / endTime: 24h "HH:mm", Seattle time
  • location: { name, address?, mapUrl? } (replaces the unused location?: string)

Display: new EventDetails component lists the event's

  • 📆 date
  • ⏰ time (only when startTime is set)
  • 📍 location, with the venue linked to mapUrl and the address in parentheses

It's shown on homepage event cards (Event.astro) and replaces the two duplicated lists on /events/<id> (page and email views). RSVP on event pages works as before.

Data: adds venues to the 2024 events in events.json, taken from their descriptions and ti.to pages. January 2024 also gets its time (5:30pm–8pm, from its description).

Things to know

  • Event pages no longer show a hard-coded time. /events/<id> used to show 5:30pm - 8:30pm for every event. It now shows the event's own time, so events without startTime have no ⏰ bullet.
  • The homepage only shows upcoming events from events.json. The latest entry is November 2024, so the homepage won't show these bullets until the next meetup is added.
  • The Airtable CLI doesn't fill in these fields yet. seattlejs-airtable-cli only maps Name, Date, Link and Description when it creates an event, and the Airtable Events table has no time or venue columns. New events need these fields added by hand until the base and the CLI are updated. Existing events keep them when the CLI updates them. I can follow up with a CLI PR once the column names are agreed.

Testing

  • npm run check: 0 errors, 0 warnings
  • npm run build and the Prettier check pass
  • Checked the built HTML for /events/january-2024 (time + venue), /events/april-2024 (venue + address), /events/september-2024 (venue without address) and /events/may-2022 (no new fields)
  • Built the homepage with a temporary future event to confirm the date/time/location bullets render, then removed it

Refs seattlejs#127

- Add optional startTime/endTime ("HH:mm", Seattle time) and a
  structured location (name, address, mapUrl) to SJSEvent
- Add EventDetails component listing the event's date, time, and
  location; show it on homepage event cards and on event pages
- Backfill venues for 2024 events

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add date, time, & location to event schme and event display

1 participant