Skip to content

Admin: event page details on the event form - #320

Merged
Flapjacck merged 6 commits into
feat/event-details-datafrom
feat/event-details-form
Nov 30, 2026
Merged

Flapjacck merged 6 commits into
feat/event-details-datafrom
feat/event-details-form

Conversation

@b4sleal

@b4sleal b4sleal commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Lets execs fill in everything the new event page shows: the kind of event, its link name, highlights, dress code, stream link, two colours and a formatted description. Under the edit form, it adds the event's topics (with icons), partners, resources and the event it follows on from. Each of those saves on its own.

Part of #298
Part of #300

Type of change

  • 🎨 Frontend (public site UI, pages, styles, content)
  • ⚙️ Backend / admin (admin dashboard, Supabase tables, RLS policies, data fetching, config)
  • 📝 Docs / chore (README, CI, dependencies, cleanup)

What changed

  • Event form: Kind of event, Link name (the hint shows the full lauriercs.org/events/… address; empty uses the title and year; a taken name shows under the field), Live stream or recording, What to expect chips (food, snacks, drinks, speaker series) with Dress code, and Colours (main + second as #rrggbb or picked; empty uses LCS yellow and pink; a small preview with readable text on each colour).
  • Description: Bold, Italic, Link and Bullet list buttons, plus a Preview rendered with markdown-it with only those formats on. Typed HTML shows as text, and javascript: links are refused.
  • Edit event, "On the event's page":
    • What they'll cover: topics in order. Each topic's icon comes from a few suggestions or a search over every Lucide icon name.
    • In collaboration with: companies picked from Companies.
    • Resources: a link, or a PDF/PowerPoint file up to 20 MB, each with a kind. Added and deleted straight away; deleting asks first.
    • Last time: an earlier event, same kind first.
  • lib/form/event-form.ts: the new fields. Edits save only what changed (a changed highlight list counts). An emptied link name keeps the saved one.
  • saveRelated writes the list first, then removes links that were taken out, like topics and partners.
  • CSV import: new rows start from the empty form, so they get every new field's default.
  • docs/admin-guide.md: the new fields and panels.

⚙️ Backend / admin only: data changes

  • No Supabase changes
  • Supabase schema changed (tables/columns listed below, with a migration or SQL included)
  • RLS policies added or changed (only signed-in execs can write; public can only read)
  • New environment variables (added to .env.example and noted below)

Uses the columns and tables from the event details data PR. New dependency: markdown-it (and @types/markdown-it).

How to test

  1. pnpm i && pnpm dev in apps/admin
  2. New event: pick a kind, tick a couple of highlights, type #ff9770 as the main colour and check the preview. Type a description with the toolbar and press Preview.
  3. Check the hint under Link name shows the address it will get. Save, then try another event with the same link name: the error shows under the field.
  4. Edit an event: add two topics, search for an icon (e.g. "rocket"), reorder them and Save topics. Then add a partner, add a link resource and a PDF, delete one (it asks first), and pick a Last time event.
  5. Reload the page and check everything is still there.

Checklist

  • pnpm lint and pnpm build pass locally
  • PR is small and focused on one issue
  • I understand every line of this code (AI-assisted is fine, AI-authored without review is not)
  • No secrets, keys, or .env files committed (anon key only on the client, never the service role key)
  • Docs/README updated if setup, routes, or env vars changed

@b4sleal b4sleal self-assigned this Nov 30, 2026
@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
admin_page Ready Ready Preview Nov 30, 2026 3:17am UTC
better-website Ready Ready Preview Nov 30, 2026 3:17am UTC

@Flapjacck Flapjacck left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This branch was successfully deployed

1 active deployment
Preview – better-website — 1d1b0e5a Deployed Nov 30, 2026 by vercel[bot]
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.

2 participants