fix(renderer): a skipped page's answers stop driving conditions; languages 3.7.0 - #508
Conversation
3.7.0 translates pages.page, so the locale test checks every pages.* key again and the docs no longer say it shows in English. Refs #122
A skipped page's fields kept driving other conditions, so a page shown by an answer on a skipped page stayed in play. While a page is skipped its fields now read as empty, unchecked and not visible, and the conditions watching that page re-run whenever it is skipped or back. A condition that skips or brings back a page still reads that page's own fields as they are, so a page can skip itself by its own answer without its bring-back condition undoing the skip at once. Refs #122
The own-page exemption applied to the whole condition, so a condition showing its own page and another one read its own page's answers as they are for both, and wasn't re-run when its page was skipped. Now only an action that skips or brings back a page reads that page as it is; every other action reads a skipped page as unanswered. A page's skip re-runs the conditions watching it that act on any other target, leaving that page's own actions alone. destroy() drops the runners. The re-run test now uses a value action whose source still matches when the page comes back, so it fails if every condition re-runs. Docs note that value actions reading a page can fire as it's skipped. Refs #122
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Address the self-skip condition rerun and stale listener teardown issues in src/lib/js/renderer/index.js.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Fixes skipped-page condition handling and updates page-label translations to @draggable/formeo-languages 3.7.0.
Changes:
- Treats skipped-page answers as unanswered for dependent conditions.
- Adds regression tests and documentation.
- Updates localization dependencies and validation.
| File | Summary |
|---|---|
tests/renderer-pagination.spec.js |
Adds VAT wizard integration coverage. |
src/lib/js/renderer/renderer.test.js |
Tests condition-runner cleanup. |
src/lib/js/renderer/pagination.test.js |
Adds skipped-page condition coverage. |
src/lib/js/renderer/index.js |
Implements skipped-page handling; requires fixes for self-skip reruns and listener teardown. |
src/lib/js/components/stages/stages-pages.test.js |
Validates translated page keys. |
src/lib/js/components/stages/page-text.mjs |
Updates translation fallback documentation. |
package.json |
Bumps the languages dependency. |
package-lock.json |
Locks languages package 3.7.0. |
docs/renderer/renderer.md |
Documents skipped-page behavior. |
docs/editor/pages.md |
Updates page and localization documentation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| */ | ||
| rerunConditionsReading = stage => { | ||
| for (const { watched, pages, run } of this.conditionRunners) { | ||
| if (pages.some(page => page !== stage) && watched.some(component => stage.contains(component))) { |
|
@copilot Fix the code for all comments in this review thread. When a review comment includes a suggested change, apply the suggestion exactly. Do not make changes beyond what is described in the linked review thread. |
Co-authored-by: kevinchappell <1457540+kevinchappell@users.noreply.github.com>
Implemented the review-thread fix in commit I updated the renderer rerun logic so unskip transitions re-run self-skip conditions, while skip transitions suppress only same-stage actions that would immediately unskip the newly skipped page. I also added a focused pagination regression test for this exact case. |
|
🎉 This PR is included in version 5.9.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |

What
Two #122 follow-ups.
Translated
pages.page. Bumps@draggable/formeo-languagesto^3.7.0, which translatespages.page. The locale test checks everypages.*key again, and the docs no longer say it shows in English.A skipped page's answers no longer drive other conditions.
destroy()now also releases the renderer's condition runners.Behaviour change. Forms that relied on a skipped page's answers still driving other pages will see those pages drop out while it's skipped. Its answers stay on the page and count again when it comes back. A
valueaction whose source is on a skippable page can now fire when that page is skipped or comes back. The skipped-pages section ofdocs/renderer/renderer.mdcovers both.Refs #122
Testing
npm test: 584 passnpm run lint: clean