Repository navigation
feat(data): share and embed cards for every section, behind the share flag - #65994
Conversation
…lined share button
… the editor losing modality
…ers, coloured callout values
…er highlight label
… card; crisp chart icons
# Conflicts: # packages/data/app/src/routes/index.tsx
There was a problem hiding this comment.
The explicit-track point is fixed: Share opens with its music muted, and Shuffle only picks clean tracks. I couldn't watch the cards because there's no browser here. I checked on vite dev that translated embeds and oEmbed work: /de/data/embed/retention is served in German, and /data/oembed returns the German title and a /de/ iframe. The package tests (44, including share-i18n.test.ts) and tsc pass. Public API: unchanged.
The nav font and Live-embed threads are still open. The new chart choice (race, list, dots) has the same problem as the day and Lead: embedUrl doesn't carry it, so a Live embed falls back to the default bars.
adamdotdevin
left a comment
There was a problem hiding this comment.
Looks good, approved. Merge once CI is green.
Issue for this PR
No issue: new feature for opencode.ai/data.
Type of change
What does this PR do?
Adds a Share button to each section of the data home page. It opens an editor that makes a branded card of that section as a video, an image or an embed.
Behind the new data-site flag
share(src/lib/flags.ts): on in local builds and every stage except production, off in production.DATA_FLAGS=shareorDATA_FLAGS=-shareforces it either way at build time. With it off, the buttons, the editor,/data/embedand/data/oembedare gone.src/share/card.ts), so the preview, the PNG and every video frame come from the same code. Headline, Number and Title layouts; 4:5, 1:1, 9:16 and 16:9; Dark, Light and Top styles.public/share-music, 7 explicit). It opens on a blank card, cuts on the track's beat, plays a dot equaliser behind bar charts and ends on beat-cut closing slides. Music always starts muted when the editor opens. A timeline under the card seeks the video and the music./data/embed/<section>draws the card in an iframe, silent, playing once when it scrolls into view. Live (rebuilt from the latest data) or Fixed (the card packed into the URL fragment)./data/oembedturns a pasted link into the card.translate()gains plural forms ({{count|one:day|other:days}}). The editor works right to left in Arabic, and Arabic falls back to a proportional Arabic face instead of Courier New's monospace Arabic.How did you verify your code works?
Exported images, videos and embeds from every section, size and chart, and checked frames, in English, German, Japanese and Arabic.
Screenshots / recordings
Checklist