feat(home): swap the promo video for the interactive walkthrough - #44
Merged
Conversation
The home page led with a click-to-load YouTube facade. It now leads with
the demo itself: two self-contained bundles in public/demo/ — a 16:9
editor clip and a portrait phone clip — picked by viewport and played
when they scroll into view. React, fonts and screenshots are inlined, so
this keeps the facade's property of making no third-party request, and
adds nothing to our own bundle.
Two things the bundles do not agree on, both handled in the component:
- They listen for different messages and each ignores the other's — the
desktop clip wants the string 'libredb-demo:play', the phone clip wants
{type: 'om-demo-play'}. Both forms go out; the loaded clip picks up its
own.
- The desktop clip's 'play' does not resume a paused run, it starts
another timeline on top of it, so a second animated cursor drifts
across the frame after the first scroll-away-and-back (a third after
the next). It is played once per document and a re-entry reloads it.
The phone clip resumes properly and just continues.
The frame takes the full container width rather than the video's
max-w-3xl: the clip renders a whole IDE at 16:9, and the extra ~250px is
the difference between readable SQL and a thumbnail. Below md the phone
clip is readable at 390px, which the scaled-down desktop clip was not.
PromoVideo stays — /get-started still uses it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The home page led with a click-to-load YouTube facade. It now leads with the demo itself.
Two self-contained bundles in
public/demo/— a 16:9 editor clip and a portrait phone clip — picked by viewport, played when they scroll into view, paused when they leave. React, fonts and screenshots are all inlined, so this keeps the facade's property of making no third-party request (verified in a network trace: no unpkg, no CDN), and adds nothing to our own bundle.Two things the bundles disagree on
Both are handled in
LibreDBDemo.astro, and both were found by testing rather than reading:They speak different postMessage protocols, and each ignores the other's.
'libredb-demo:play'(string){type: 'om-demo-play'}(object)The component sends both forms; the loaded clip picks up its own.
The desktop clip's
playdoes not resume a paused run — it starts another timeline on top of it, so a second animated cursor drifts across the frame after the first scroll-away-and-back, and a third after the next. It is played once per document and a re-entry reloads it instead. The phone clip resumes properly and just continues from where it stopped.Layout
The frame takes the full container width rather than the video's
max-w-3xl: the clip renders a whole IDE at 16:9, and the extra ~250px is the difference between readable SQL and a thumbnail. Belowmdit swaps to the portrait clip (aspect-[430/960], capped at 460px, no border — the clip draws its own device frame), which is readable at 390px where the scaled-down desktop clip was not. Crossing the breakpoint live — a rotated tablet, a resized window — swaps the clip.The markup carries the desktop
srcso it still renders without JS; the script swaps in the phone clip at parse time, well before a lazy iframe this far down the page starts fetching, so a phone never pulls the 439KB desktop bundle.PromoVideostays —/get-startedstill uses it.Verified
dist/demo/.