Conversation
App-side companion to CorrelAid/formtransform-app#7. The CDL website intro for the FormTransform page was factually stale on three counts and the migration off xlsform2lstsv + Pyodide made all three visible: - it still credited xlsform2lstsv; - it only mentioned the LimeSurvey TSV conversion, not the DDI Codebook XML output; - it did not warn that the converter is a strict subset of the CDL survey type registry, so an arbitrary XLSForm is rejected rather than approximated. Replace the xlsform2lstsv link with the @correlaid/formtransform repo (the new single dependency that powers both conversions). Add the DDI output. Add the same one-sentence scope caveat that the in-app notice uses, in both EN and DE, to keep the two surfaces in sync.
This was referenced Aug 19, 2026
jstet
pushed a commit
to CorrelAid/formtransform-app
that referenced
this pull request
Sep 24, 2026
Closes #7. The library is strict by design — it rejects any XLSForm question type, appearance, or expression outside the CDL survey type registry, with the same "no guessing" rule applying to identifier length, nesting depth, and reserved words. Someone arriving with an arbitrary XLSForm will see the lib throw, and read the throw as a bug. Two surfaces, kept in sync, so the restriction is stated up front: - in-app: a callout between the page <h1> and the tab bar, string in the app's own i18n (not the fetched CDL snippet — the cdl-content plugin silently falls back to '' on a fetch failure, so a disclaimer that can vanish is not a disclaimer); - on the CDL website: same caveat in the existing single-<p> formtransform snippet, which was also factually stale on three points (still credited xlsform2lstsv, only mentioned the TSV path, no scope caveat). Companion PR: CorrelAid/cdl-wp-eins#25. ### In-app changes - src/lib/i18n.ts: new `scope.notice` and `scope.link` strings in both locales, EN + DE, using the wording drafted in the issue (no softening into marketing copy). - src/routes/+page.svelte: import `marked` from the now-direct app dep, render the notice as a bordered callout between the description and the tab bar. The value passed to `$t(...)` is plain text (the `**...**` is markdown), so the issue's "no `{@html}` over user-controlled strings" rule is preserved. Styling uses existing CDL tokens: `--color-secondary` for the left border, `--color-background-primary` for the fill, `--spacing-base` for padding, `--radius-md` for the corners. - package.json: add `marked` as a direct dependency (the lib already used it transitively for `convertMarkdown: true` in the TSV tab; the app now declares it explicitly because it also renders the scope notice). - bun.lock: one new line for `marked`. - scripts/verify-scope-notice.mjs: Playwright driver. Loads `/`, then switches to DE via the LanguageSwitcher, and asserts: (a) `.scope-notice` exists in both locales, (b) it appears before `.tab-nav` in document order, (c) no `pageerror` or `console.error` fires. ### Verification `bun scripts/verify-scope-notice.mjs http://127.0.0.1:5175/` against the built static site reports both locales render with the notice before the tabs and no console errors. EN shows "Scope: the CDL survey ecosystem." in bold; DE shows "Geltungsbereich: das CDL-Umfrage-Ökosystem." Both link to `https://github.com/CorrelAid/formtransform#supported-xlsform-subset`. `bun run build` is green. `bun run lint` and `bun run check` remain broken on main (19 / 1+4 pre-existing); unchanged by this commit, out of scope for #7. ### Out of scope - Snippet freshness in `vite.config.ts`'s cdl-content plugin (the build-time fetch of the snippet). The app will pick up the new snippet text the next time the build runs against the merged CDL PR; nothing on the app side needs to change.
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.
Companion PR to CorrelAid/formtransform-app#7. The current snippet at
src/content/snippets/formtransform/{en,de}.htmlis stale on three points that the migration offxlsform2lstsv+ Pyodide/survey2ddi(seeCorrelAid/formtransform-appHANDOVER doc) made obvious:xlsform2lstsv, which has been removed from the app;This PR does three things in both EN and DE, keeping the existing
<section><p>…</p></section>shape:xlsform2lstsvlink with the@correlaid/formtransformrepo;No other snippets or template files are touched. DDI link points at the public DDI Alliance spec page;
@correlaid/formtransformlink points at the repo's README (the canonical place for the supported-subset list — same anchor the in-app notice links to).