Skip to content

Conversation

@Sylver-Icy
Copy link

What this adds

  • A minimal, reusable <Table /> component exported from $lib
  • A demo page (/demo-table) showing the component in real usage
  • Demo loads a bundled SQLite database client-side via sql.js and renders query results

How to test

  1. Run Statue locally
  2. Visit /demo-table
  3. You should see data rendered from static/demo.db

Notes

  • The table component is intentionally minimal (no sorting/pagination yet)
  • I left existing template warnings and Svelte 5 rune-related warnings untouched,
    since they pre-exist and seem orthogonal to this change

let loading = true;
let error: string | null = null;

onMount(async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if we moved this to somewhere in src/lib or created a components/SQLite.svelte that included this logic? But we would want the path passed as a prob

@fredxfred
Copy link
Contributor

Hey, could you please include a screenshot? Also, can you remove the .db file/add it to .gitignore, and instead check in a bash script that creates one, and then not include the table->sqlite db on the default about page?

That way we can reproduce the example/use the component but don't have to distribute it with the site, since it's a binary file it'd be better not to have it in git I think.

This is cool btw, I'm glad you got this far!

@Sylver-Icy
Copy link
Author

Good point
I included the .db initially just to make the demo immediately runnable/testable without extra setup while iterating, not as a long-term approach.
I’ll remove it from git, add it to .gitignore, and instead check in a small script that generates the demo DB locally so the example stays reproducible without shipping the file itself
I’ll also refactor the SQLite loading logic into a reusable component under src/lib and pass the DB path as a prop, per your suggestion. Will push an update shortly 👍

@Sylver-Icy
Copy link
Author

Updated :D

• Refactored SQLite logic into reusable component
• Removed binary .db from git
• Added script to generate demo DB locally for reproducibility

@Sylver-Icy Sylver-Icy force-pushed the feat/table-sqlite-demo branch from 2ab926e to 2d19daa Compare December 29, 2025 14:06
@Sylver-Icy
Copy link
Author

image sorry forgot to attach before

@fredxfred
Copy link
Contributor

that looks good!

@fredxfred
Copy link
Contributor

Can you help resolve the merge conflicts? I may have made a mistake when I tried

@Sylver-Icy Sylver-Icy force-pushed the feat/table-sqlite-demo branch from ce698af to 2cea044 Compare January 3, 2026 02:02
@Sylver-Icy
Copy link
Author

Resolved merge conflicts and CI failures by aligning Vitest dependencies and regenerating the lockfile.
All checks are now passing. This PR should be good to merge.

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.

3 participants