Skip to content

feat(landing/codeExamples): add 'lit-query' code example to query quick start#906

Open
sukvvon wants to merge 2 commits intoTanStack:mainfrom
sukvvon:feat/landing-code-examples-add-lit-query
Open

feat(landing/codeExamples): add 'lit-query' code example to query quick start#906
sukvvon wants to merge 2 commits intoTanStack:mainfrom
sukvvon:feat/landing-code-examples-add-lit-query

Conversation

@sukvvon
Copy link
Copy Markdown
Contributor

@sukvvon sukvvon commented May 9, 2026

Summary

  • Add a lit framework entry to queryCodeExample in src/components/landing/codeExamples.server.tsx
  • Mirrors the structure of the existing react/preact/solid examples (same queryKey, queryFn, and Loading... / Oops! flow), adapted to Lit using createQueryController from @tanstack/lit-query
  • The query library declares lit in its frameworks list, but the quick start code panel was missing the lit example

Test plan

  • Visit /query/$version landing page and switch the framework selector to Lit
  • Confirm the Lit code snippet renders with proper syntax highlighting

Summary by CodeRabbit

  • Documentation
    • Added a Lit + TypeScript code example demonstrating a todos-list custom element that fetches and renders a list with loading and error states, illustrating user-facing behavior and integration patterns in the code examples section.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 9, 2026

👷 Deploy request for tanstack pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit fa676b2

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2a664347-0c76-4279-86bc-e7822c02516a

📥 Commits

Reviewing files that changed from the base of the PR and between 719c2de and fa676b2.

📒 Files selected for processing (1)
  • src/components/landing/codeExamples.server.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/landing/codeExamples.server.tsx

📝 Walkthrough

Walkthrough

Adds a Lit/TypeScript code example to queryCodeExample.codeByFramework demonstrating a TodosList custom element that uses createQueryController to render loading, error, and a list of todo titles from /api/todos.

Changes

Framework Code Examples

Layer / File(s) Summary
Lit Framework Example
src/components/landing/codeExamples.server.tsx
New lit entry added to queryCodeExample.codeByFramework containing a TypeScript TodosList custom element example using createQueryController, with conditional rendering for pending, error, and a mapped <ul> of todo titles.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I scurried through lines with a bright little hop,
Lit tags and queries now dance on the top,
TodosList hums while loading and errs,
Then renders the list with gentle whirs,
A tiny example—may it help and delight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a Lit framework code example to the query quick start landing page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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