Skip to content

Conversation

jaysin586
Copy link
Contributor

@jaysin586 jaysin586 commented Sep 28, 2025

Summary by CodeRabbit

  • New Features

    • Example pages now show a Motion.dev “Live Demo” button when available.
    • Added a new “HTML Content” example page with a linked live demo.
    • Integrated live demo links into existing examples (e.g., Rotate, Hover & Tap).
  • Documentation

    • Updated README Examples table: renamed “REPL” to “Live Demo.”
    • Refreshed and redirected several example links to new live demos.
    • Added a new “Rotate” row with its live demo link.
    • Updated “HTML Content” and “Hover + Tap” entries with new demo destinations.

Copy link
Contributor

coderabbitai bot commented Sep 28, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Updates README example links and column header. Enhances docs sitemap script regex/indentation. Adds motionUrl support to Example.svelte and propagates sourceUrl from example pages to render a Motion.dev button. Introduces a new HTML Content example and page. Adjusts examples metadata and minor cleanup. Updates a test to use local state.

Changes

Cohort / File(s) Summary
Docs README examples table
README.md
Renamed “REPL” column to “Live Demo”; updated multiple example links; added Rotate row; redirected demo URLs.
Sitemap manifest generation
docs/scripts/generate-sitemap-manifest.mjs
Replaced regex to match full examples declaration with anchored lookahead; changed JSON stringify indent from 8 to 4 spaces; kept flow and errors unchanged.
Example component motionUrl support
docs/src/lib/components/general/Example.svelte
Added ExampleProps type with optional motionUrl; imported Snippet type; destructured motionUrl; conditionally renders a Motion.dev button when motionUrl provided.
New example snippet
docs/src/lib/examples/HTMLContent.svelte
Added animated count example using motion/animate; updates count on frame; cleans up on unmount; renders styled motion.pre.
Examples index metadata
docs/src/routes/examples/+page.ts
Added 'html-content' entry with title, description, sourceUrl.
Example pages wiring (sourceUrl → motionUrl)
docs/src/routes/examples/hover-and-tap/+page.svelte, docs/src/routes/examples/rotate/+page.svelte, docs/src/routes/examples/html-content/+page.svelte, docs/src/routes/examples/html-content/+page.ts, docs/src/routes/examples/animated-button/+page.ts, docs/src/routes/examples/animated-button/+page.svelte
Pages now read data via props; pass data.sourceUrl to Example as motionUrl; added new HTML Content page (+page.svelte/+page.ts); removed sourceUrl from Animated Button load; minor whitespace cleanup.
Test update (local state)
src/routes/tests/motion/html-content/+page.svelte
Replaced writable store with local reactive variable; updated onUpdate assignment and template binding; removed svelte/store import.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Router as SvelteKit Router
  participant Load as +page.ts (load)
  participant Page as +page.svelte
  participant Example as Example.svelte

  User->>Router: Navigate to /examples/<name>
  Router->>Load: Call load()
  Load-->>Router: { title, sourceUrl }
  Router->>Page: Render with data
  Page->>Example: <Example motionUrl=data.sourceUrl>...</Example>
  alt motionUrl provided
    Example-->>User: Renders "Motion.dev" button (opens in new tab)
  else no motionUrl
    Example-->>User: Renders without Motion.dev button
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

documentation, enhancement

Poem

I hop through links with gleeful cheer,
A Motion button now appears!
New spins, new counts, a tidy map—
Breadcrumbs set for every lap.
With whiskers twitching, off I go,
To live demos that brightly glow. 🐇✨

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch initial-creation

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ec975b and 25cb24f.

📒 Files selected for processing (12)
  • README.md (1 hunks)
  • docs/scripts/generate-sitemap-manifest.mjs (1 hunks)
  • docs/src/lib/components/general/Example.svelte (2 hunks)
  • docs/src/lib/examples/HTMLContent.svelte (1 hunks)
  • docs/src/routes/examples/+page.ts (1 hunks)
  • docs/src/routes/examples/animated-button/+page.svelte (0 hunks)
  • docs/src/routes/examples/animated-button/+page.ts (1 hunks)
  • docs/src/routes/examples/hover-and-tap/+page.svelte (2 hunks)
  • docs/src/routes/examples/html-content/+page.svelte (1 hunks)
  • docs/src/routes/examples/html-content/+page.ts (1 hunks)
  • docs/src/routes/examples/rotate/+page.svelte (2 hunks)
  • src/routes/tests/motion/html-content/+page.svelte (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@jaysin586 jaysin586 merged commit 01d1fcb into main Sep 28, 2025
3 of 4 checks passed
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