Skip to content

feat(section): limit jumps to the start of a section - #4008

Open
AndyScherzinger wants to merge 1 commit into
feat/sections-2-pagesfrom
feat/sections-3-jump-targets
Open

AndyScherzinger wants to merge 1 commit into
feat/sections-2-pagesfrom
feat/sections-3-jump-targets

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Part 3 of the sections stack. Based on #4007; the "Files changed" tab shows only this part.

Stack

Sections build on conditional questions. Each PR is based on the one before it and works on its own. Review and merge from the top.

Conditional questions:

  1. Conditional questions: go to a question based on the answer #3833 Conditional questions: go to a question based on the answer
  2. Conditional questions: go to a question after checkbox questions #3834 Conditional questions: go to a question after checkbox questions
  3. Conditional questions: go to a question after date and time questions #3835 Conditional questions: go to a question after date and time questions
  4. Conditional questions: go to a question based on the value of a linear scale #3837 Conditional questions: go to a question based on the value of a linear scale

Sections:

  1. feat: introduce Section as a new question type #3664 Sections as a question type: numbering, the frame and bar in the editor, every question in a section
  2. feat(section): show one page per section #4007 One page per section
  3. feat(section): limit jumps to the start of a section #4008 Jumps go to the start of a section ← this PR
  4. feat(section): go to a chosen section after a section #4009 "After this section go to …"
  5. feat(section): ask whether deleting a section keeps its questions #4010 Delete a section
  6. feat(section): reorder sections in a dialog #4011 Reorder sections in a dialog
  7. feat(section): show sections as headings in the results summary #4012 Section headings in the results summary

This PR

  • In a form with sections, a jump goes to a later question of its own section, to a later section or to the end of the form, as in Microsoft Forms. A page therefore never starts in the middle of a section.
  • The server removes other jumps wherever it already removes backward jumps (updating, reordering, copying questions, copying and importing forms), and reports them in X-Forms-Adjusted as before. Inserting a section at a position removes the jumps that would now go into its middle, with the same header.
  • The editor offers only the allowed targets, asks before a move turns jumps into jumps into another section, naming the moved question or section ("Move back" or "Remove jumps"), and warns when inserting a section removes jumps.
  • A form without sections behaves exactly as before: the rule then only forbids backward jumps.
  • docs/API_v3.md, docs/DataStructure.md and openapi.json describe the rule.

Screenshots

Before After
Before: the questions inside the section are offered as targets After: only the section and the end of the form are offered

Tests

  • PHPUnit: removeDisallowedJumps() with sections; the client mirror withoutDisallowedJumps() runs on the same data.
  • e2e: the target list, the server removing a jump into a section on update and on inserting a section, and the confirmation when moving a question past a section heading. Jump specs pass unchanged.
  • Tested on a running Nextcloud 36 instance.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 41b04d8 to a528957 Compare November 23, 2026 21:45
@AndyScherzinger AndyScherzinger added this to the 5.5 milestone Nov 23, 2026
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch 2 times, most recently from 18d1441 to 649b734 Compare November 24, 2026 00:28
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-2-pages branch 2 times, most recently from 036ac11 to 7d80476 Compare November 24, 2026 00:51
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 649b734 to 4607e5e Compare November 24, 2026 00:51
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 4607e5e to 435d926 Compare November 24, 2026 07:28
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch 2 times, most recently from 17d41f8 to ce8a60a Compare November 24, 2026 11:05
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from ce8a60a to c8692aa Compare November 24, 2026 11:17
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from c8692aa to daaf334 Compare November 24, 2026 13:17
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from daaf334 to cf557b1 Compare November 24, 2026 19:32
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-2-pages branch 2 times, most recently from b029eab to abf14c4 Compare November 25, 2026 13:36
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 7ee8f77 to 9284a2d Compare November 27, 2026 17:39
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-2-pages branch 2 times, most recently from 4b71a05 to c691193 Compare November 27, 2026 19:59
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 9284a2d to 10be2a7 Compare November 27, 2026 19:59
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch 2 times, most recently from a01dc03 to b9602a4 Compare November 27, 2026 20:33
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-2-pages branch 2 times, most recently from c4ac799 to 603cb46 Compare November 28, 2026 11:06
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from b9602a4 to e0eb191 Compare November 28, 2026 11:06
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from e0eb191 to 90e02c7 Compare November 30, 2026 13:51
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 90e02c7 to 649a37e Compare December 1, 2026 07:23
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 649a37e to 9d7db9c Compare December 1, 2026 09:37
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 9d7db9c to 518bd0e Compare December 1, 2026 14:20
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 518bd0e to f83e4e3 Compare December 1, 2026 15:56
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from f83e4e3 to c27ee0a Compare December 1, 2026 17:34
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from c27ee0a to 0717659 Compare December 1, 2026 19:26
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 0717659 to 7e30f39 Compare December 2, 2026 08:41
In a form with sections, a jump goes to a later question of its own
section, to a later section or to the end of the form, as in Microsoft
Forms, so a page never starts in the middle of a section. The server
removes other jumps wherever it removes backward jumps, and inserting
a section removes the jumps that would go into its middle. The editor
offers only these targets and asks before a move turns jumps into
jumps into another section.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 7e30f39 to 95a353c Compare December 2, 2026 08:54
@AndyScherzinger
AndyScherzinger marked this pull request as ready for review December 2, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant