Add auto-generated brand graphic as default event photo#18451
Add auto-generated brand graphic as default event photo#18451joethreepwood wants to merge 6 commits into
Conversation
Adds an EventGraphic component that renders a 1:1 branded promo graphic for events: speaker topic/event name in Squeak, date and location in Open Runde, the first speaker's community profile avatar and favorite color as the background, and a PostHog + partner footer bar. Used as the event's photo in the events list and detail panel whenever no photo has been uploaded, with a live preview and 1080x1080 PNG download in the event form. Generated-By: PostHog Code Task-Id: 314f8865-312d-481e-8930-55406634b37e
Deploy preview
|
|
Vale prose linter → found 0 errors, 6 warnings, 0 suggestions in your markdown Full report → Copy the linter results into an LLM to batch-fix issues. Linter being weird? Update the rules!
|
| Line | Severity | Message | Rule |
|---|---|---|---|
| 10:97 | warning | 'Runde' is a possible misspelling. | PostHogBase.Spelling |
| 11:122 | warning | 'safelisted' is a possible misspelling. | PostHogBase.Spelling |
| 12:5 | warning | 'Headshot' is a possible misspelling. | PostHogBase.Spelling |
| 12:187 | warning | 'Runde' is a possible misspelling. | PostHogBase.Spelling |
| 33:84 | warning | 'rasterizes' is a possible misspelling. | PostHogBase.Spelling |
| 50:42 | warning | 'Strapi' is a possible misspelling. | PostHogBase.Spelling |
The generated graphic now always headlines the event name (the speaker topic is no longer pulled in), and events without a speaker avatar fall back to the hogzilla artwork. Generated-By: PostHog Code Task-Id: 314f8865-312d-481e-8930-55406634b37e
The arrowhead now points along the curve's direction of travel toward the headshot, and a "Featuring:" label sits above the speaker's name and role. Generated-By: PostHog Code Task-Id: 314f8865-312d-481e-8930-55406634b37e
Generated-By: PostHog Code Task-Id: 314f8865-312d-481e-8930-55406634b37e
|
Works for me locally. Needs a @smallbrownbike pass and probably a look over by @lottiecoxon but it now automatically generates art for you as a template when you create an event. You can override this by adding custom photos. It has a fallback of using a hedgehog if no speaker is specified, otherwise it pulls in the speaker for the image and uses their specified favourite colour to set the background for some visual variation. Text placement and sizing can be tricky, potentially overrunning etc. So, this generates a live preview for you to tailor around. You can add partners as just text. It even lets you download the image so you can share it with Liam for socials too. Basic template and the fallback for when there's no speaker: Couple of examples of what gets auto-generated when you add a speaker:
|
Static HTML generation for /careers crashes with "slugify: string argument expected" when a featured team member's profile has no team name, which currently fails the preview build on every PR. Skip the team link when the profile has no team instead of crashing. Generated-By: PostHog Code Task-Id: 314f8865-312d-481e-8930-55406634b37e
Bundle reportTotal JS (gzip)6.31 MiB (+1.5 KiB / +0.0%) Largest changed named chunks
Eager graph (modules shipped in each entrypoint's initial chunks)
Largest modules in the
|
| Module | Size |
|---|---|
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css |
710.9 KiB |
./src/components/Stickers/Stickers.tsx |
696.4 KiB |
./.cache/caches/gatsby-plugin-mdx/mdx-scopes-dir/31a094f140f119e73085d847ae81b99b.js + 2 modules |
615.0 KiB |
./node_modules/.pnpm/@radix-ui+react-icons@1.3.2_react@18.3.1/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js |
481.4 KiB |
./node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.js + 29 modules |
395.1 KiB |
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.cjs.js |
364.8 KiB |
./src/hooks/useCustomers.tsx + 54 modules |
355.1 KiB |
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js |
354.8 KiB |
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules |
351.4 KiB |
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js |
281.9 KiB |
./src/components/ProductComparisonTable/index.tsx + 118 modules |
275.6 KiB |
./node_modules/.pnpm/d3@7.9.0/node_modules/d3/src/index.js + 208 modules |
247.4 KiB |
./src/components/Pricing/PricingSlider/Slider.tsx + 87 modules |
239.9 KiB |
./gatsby-browser.tsx + 41 modules |
239.8 KiB |
./src/components/SearchUI/index.tsx + 73 modules |
223.4 KiB |
Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).
Generated-By: PostHog Code Task-Id: 314f8865-312d-481e-8930-55406634b37e




Changes
Events on
/eventsnow get an auto-generated, brand-templated graphic as their default photo whenever no photo has been uploaded.EventGraphiccomponent: a square promo graphic with the speaker topic (or event name) in Squeak (uppercase/bold, per the visual identity guidelines), the date and city/country in Open Runde, the first speaker's community profile portrait in a white-ringed circle, and a footer bar with the PostHog logo plus "with {partner}". The background is the speaker's favorite color from their community profile, with automatic black/white text contrast. Events without speakers fall back to hedgehog artwork.html-to-image, same pattern as the photobooth).Rendered output was verified in headless Chromium (speaker card with partner, long-title step-down, no-speaker fallback, and the 80px list thumbnail) — worth re-checking visually in the Vercel preview.
Why: event organizers currently have to hand-make promo images for each meetup; this generates an on-brand default from data already captured in the event creation flow.
Checklist
vercel.json(no pages moved)Created with PostHog Code