Skip to content

feat(section): go to a chosen section after a section - #4009

Open
AndyScherzinger wants to merge 1 commit into
feat/sections-3-jump-targetsfrom
feat/sections-4-after-section
Open

AndyScherzinger wants to merge 1 commit into
feat/sections-3-jump-targetsfrom
feat/sections-4-after-section

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Part 4 of the sections stack. Based on #4008; 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
  4. feat(section): go to a chosen section after a section #4009 "After this section go to …" ← this PR
  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

  • Every section offers "After section N go to": the next section (default), a later section or the end of the form, as in Microsoft Forms. For the last section the default is the end of the form.
  • It is stored as next on the section and applies when the path leaves the section by default. A jump of an answer out of the section wins over it; a jump within the section still ends at it. A section with no title, no description and no questions has no page of its own, so respondents go straight to its target, also when that is the end of the form.
  • Client and server walk the path the same way, checked by five new cases in the shared tests/fixtures/jump-paths.json.
  • A section's next may only point at a later section or the end of the form; other targets are removed like other disallowed jumps. The editor counts the questions it skips as unreachable.
  • The editor warns on each question when more than one question of a section jumps out of it, as respondents follow the first of these jumps on their path.
  • The select sits on the section heading, as the section is one item in the flat list of questions.

Screenshots

Before After
Before: a section without a choice where to go next After: the section offers "After section 1 go to"

Tests

  • Shared path fixture (PHPUnit and Playwright), PHPUnit for the target rule of sections, client tests for the rule and unreachable questions.
  • e2e: the options of the select, saving it, a respondent skipping the section in between, and an empty section sending respondents on to its target and to the end of the form.
  • 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-4-after-section branch from 0d29f4b to 9f319c9 Compare November 23, 2026 21:21
@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/Service/FormsService.php 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-4-after-section branch from 9f319c9 to 4a3378c Compare November 23, 2026 21:45
@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-4-after-section branch from 4a3378c to cc4bace Compare November 24, 2026 00:01
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from a528957 to 18d1441 Compare November 24, 2026 00:01
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-4-after-section branch from cc4bace to d451dcb Compare November 24, 2026 00:28
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 18d1441 to 649b734 Compare November 24, 2026 00:28
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-4-after-section branch from d451dcb to fdeed15 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-4-after-section branch 2 times, most recently from 7e195fa to a227d33 Compare November 24, 2026 07:46
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch from 17d41f8 to ce8a60a Compare November 24, 2026 11:05
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-4-after-section branch 2 times, most recently from dbb4334 to db2323f Compare November 24, 2026 11:17
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch 2 times, most recently from c8692aa to daaf334 Compare November 24, 2026 13:17
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-4-after-section branch 2 times, most recently from b98eb73 to bed7682 Compare November 24, 2026 19:32
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-4-after-section branch 2 times, most recently from e5b2b74 to 4cd826f Compare November 27, 2026 19:59
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch 2 times, most recently from 10be2a7 to a01dc03 Compare November 27, 2026 20:29
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-4-after-section branch 2 times, most recently from 2d3f223 to c67d327 Compare November 27, 2026 20:33
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-3-jump-targets branch 2 times, most recently from b9602a4 to e0eb191 Compare November 28, 2026 11:06
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-4-after-section branch from c67d327 to 55add4c 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-4-after-section branch from 55add4c to d479b8b 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-4-after-section branch from d479b8b to 911f93e 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-4-after-section branch from 911f93e to 95ab550 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-4-after-section branch from 95ab550 to 07a3911 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-4-after-section branch from 07a3911 to 8025be4 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-4-after-section branch from 8025be4 to 1a733b4 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-4-after-section branch from 1a733b4 to 865fd68 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
@AndyScherzinger
AndyScherzinger force-pushed the feat/sections-4-after-section branch from 865fd68 to 92feb9a Compare December 2, 2026 08:41
A section can name where respondents go after it, as "After this
section go to" in Microsoft Forms: the next section, a later section
or the end of the form. It applies when the path leaves the section
by default, so a jump of an answer out of the section still wins, and
a jump within the section still ends at it. The editor shows the
choice on every section and counts the questions it skips as
unreachable.

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 force-pushed the feat/sections-4-after-section branch from 92feb9a to a46975e 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant