Repository navigation
Web editor for the Acronymizer database (Compose Web + GitHub pipeline) - #2
Merged
Merged
Conversation
- New :editor Compose for Web app (wasmJs primary, js fallback) using compose-unstyled; full CRUD over the acronymizer DB in-browser (sql.js via SQLDelight web-worker-driver). - New :db KMP module reusing the existing .sq schema (async codegen) without duplicating it; JVM :acronymizer left untouched. - GitHub token stored in a cookie; edits auto-saved to localStorage (restored on reload) with a full reset. - Source of truth is a deterministic SQL dump (data/acronymizer.sql); the .db is rebuilt in CI. Editor proposes a PR via the GitHub API. - Workflows: pr-diff (semantic add/remove comment), release (publish .db on merge), deploy-pages (publish the editor). - Bump Kotlin 2.4.0 / Compose 1.11.0.
📊 Diff de la base Acronymizer
Ajouts : 0 livres · 0 acronymes · 0 liens — Suppressions : 0 livres · 0 acronymes · 0 liens ➕ Livres ajoutés (0)aucun ➖ Livres supprimés (0)aucun ➕ Acronymes ajoutés (0)aucun ➖ Acronymes supprimés (0)aucun ➕ Liens ajoutés (0)aucun ➖ Liens supprimés (0)aucun |
…o-RTL - The editor now loads its base from a bundled Compose resource (files/acronymizer.sql, copied from data/acronymizer.sql at build time) instead of fetching it from the repo — removes the runtime 404 and any branch dependency. - Add Compose Resources i18n: English (default) + Hebrew strings; UI fully in English. - Auto RTL: layout direction follows the active browser locale (Hebrew -> RTL). - GitHub client: only add Authorization header when a token is present; drop unused dump fetch.
Executing the whole ~9 MB dump in a single db.exec overflowed the sql.js wasm memory (memory access out of bounds). Stream it as the header + 1000-line INSERT batches inside one transaction. Validated with sql.js under Node: 6878 books / 50528 acronyms / 55813 links, view and Hebrew preserved.
Compose/Skiko on web ships no Hebrew-capable font, so Hebrew text did not render. Bundle Heebo Regular/Bold (covers Latin for the English UI and Hebrew for the data, including gershayim/geresh) and provide it via LocalTextStyle so every compose-unstyled Text/TextField uses it.
Hebrew strings are now the default resource (dropped the English values-he split) and the layout direction is forced to RTL regardless of browser locale.
…marter search - Replace dingbat glyphs absent from Heebo: ✕ -> × (U+00D7); drop ✓ (use color/text). - index.html: overflow:hidden so the page never shows native scrollbars (Compose scrolls). - Wrap the book and acronym lists in compose-unstyled ScrollArea with a styled vertical scrollbar. - Search now matches book titles AND their acronyms, ranking title-prefix matches first.
…d thumb The lists now reserve a 14dp end gutter so rows never sit under the thumb, the scrollbar track is top-aligned and 8dp wide, and the thumb fills the track width with a rounded background (canonical compose-unstyled ScrollArea setup for 1.49.9).
The library's lazy scrollbar mis-estimated long lists. Compute the thumb directly from LazyListState.layoutInfo (size + position), make it draggable (scrollBy), and keep the reserved gutter so it never overlaps rows. Also alias to Unstyled* APIs to drop deprecation warnings.
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.
A complete system to edit the
acronymizer.dbdatabase from a Compose for Web app published on GitHub Pages.What it does
:editor, wasmJs primary + js fallback) built with compose-unstyled; full in-browser CRUD over the database (sql.js via the SQLDelight web-worker-driver).data/acronymizer.sqlon every build/deploy.data/acronymizer.sql); the binary.dbis rebuilt in CI.pr-diff(semantic added/removed comment),release(publishes the.dbon merge),deploy-pages(publishes the editor).:dbmodule reusing the existing.sqschema (async codegen) with no duplication; the JVM:acronymizertool is unchanged.Validated locally
export-canonical -> build-db -> re-exportis byte-identical.diff-dbis correct (added/removed books, acronyms, links).:editorcompiles and bundles for wasmJs and js.scripts/canonical-header.sql(byte-for-byte).One-time setup
Settings -> Pages -> Source = GitHub Actions (replaces the
docs/service).