Skip to content

feat(figma): live-preview onboarding, eager sync, per-file state & UX polish#127

Open
piaskowyk wants to merge 1 commit into
mainfrom
figma-preview-onboarding-ux
Open

feat(figma): live-preview onboarding, eager sync, per-file state & UX polish#127
piaskowyk wants to merge 1 commit into
mainfrom
figma-preview-onboarding-ux

Conversation

@piaskowyk

Copy link
Copy Markdown
Member

What & why

A batch of Figma-plugin and PulsarApp UX improvements around the live-preview / onboarding flow.

Figma plugin

Sync goes live automatically

  • Configuring the live preview (a valid Figma file key) — or copying the share link — now starts syncing with the backend instead of sitting at "Not shared yet".
  • On first open, the plugin eagerly provisions the backend project if this file has none yet, so the share link and pairing QR exist from the start. It's create-only (never overwrites an existing project) and runs through the same publish lock (no duplicate rows).

Per-file state (fixes "new project" bugs)

  • onboardingSeen and the phone-pairing token were stored per-user globally, so a new project never re-showed the onboarding tour and inherited a stale token that appeared as a "paired but offline" phone — which also wrongly collapsed the first configurator step and lit an amber warning dot.
  • Both are now namespaced per-file (per-user-per-file), so a new project starts clean: the tour shows on first visit, and step 1 opens with no phantom pairing.

Onboarding / explanation videos

  • Wired the clips into the tour and the two Live-preview steps. Hosted remotely (off-bundle — inlining was ~49 MB; now ~0.5 MB) via GitHub attachment URLs, with the S3 host allowlisted in manifest.json.
  • Each clip has native controls, a spinner + placeholder while buffering, and an "Open full size video" link (opens via open-external).
  • Clips are preloaded (persistent elements) so paging between steps / expanding step 2 doesn't re-buffer.
  • Added a new tour step: "Preview a preset on your device."

Legible step hand-off

  • When step 1 is completed, the accordion now runs a staged sequence — green pulse → collapse step 1 → fade in step 2 → open step 2 — instead of snapping instantly, so an accepted file key registers. Includes a real height animation (native <details> can't animate) and honors prefers-reduced-motion.

Help tab

  • Example-file link now points at the real Figma file.

PulsarApp

  • WebView loader fix: the Figma-preview loader now clears once content is ready and is non-blocking, so if the preview falls back to a Figma login page the button isn't trapped behind the spinner.
  • Now-playing banner: the "<preset> is playing!" banner now also shows on the Figma screen (extracted to a shared NowPlayingToast), not just Home.

Reviewer notes

  • GitHub-hosted videos are interim. The asset is tied to the upload comment and the S3 URL is short-signed; before a public release these should move to a durable host (e.g. pulsar-server.swmansion.com, already allowlisted) and the two GitHub/S3 manifest entries dropped.
  • The eager first-open provisioning means opening the plugin on any file now creates a backend row (deliberate reversal of the old "don't create until shared" policy).
  • Per-file token migration: existing users will re-pair once per file and see the tour again once per file after this lands.
  • Verified via tsc --noEmit + vite build (plugin) and tsc --noEmit (PulsarApp). The plugin/app surfaces need a load in Figma / a device to exercise end-to-end.

… UX polish

Figma plugin:
- Live-preview sync goes live automatically: configuring a valid file key (or
  copying the share link) starts syncing, and the plugin eagerly provisions the
  backend project on first open so the share link / pairing QR exist from the
  start.
- Scope onboarding-seen and the phone-pairing token per-file (was per-user
  global): new projects now show the onboarding tour on first visit and no
  longer inherit a phantom "paired but offline" phone (which also wrongly
  collapsed the first configurator step).
- Wire the onboarding / explanation clips into the tour and the Live preview tab
  (remote-hosted, off-bundle), each with controls, a spinner+placeholder while
  buffering, and an "Open full size video" link; preload them so paging between
  steps doesn't re-buffer. Add a "Preview a preset on your device" tour step.
- Animate the Live-preview step hand-off (green pulse -> collapse -> fade in ->
  open) so an accepted file key is legible instead of snapping to step 2.
- Point the Help tab example-file link at the real Figma file.

PulsarApp:
- Hide the Figma-preview WebView loader once content is ready (and make it
  non-blocking) so a Figma login page isn't trapped behind the spinner.
- Show the "preset playing" banner on the Figma screen too, not just Home.
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.

1 participant