Skip to content

feat(section): show one page per section - #4007

Open
AndyScherzinger wants to merge 1 commit into
feat/add-new-type-section-continuefrom
feat/sections-2-pages
Open

AndyScherzinger wants to merge 1 commit into
feat/add-new-type-section-continuefrom
feat/sections-2-pages

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Part 2 of the sections stack, based on #3664 by Koc. Based on #3664; 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 ← this PR
  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 …"
  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

  • A form with sections is shown page by page, like Microsoft Forms: each section starts a page, and questions before the first section form the first page.
  • Next checks the required questions of the current page only. Back keeps all answers. Submit shows on the last page of the respondent's path, which still follows the answers.
  • A section without questions is an info page with its title, description and Next. A section with no title, no description and no questions gets no page: respondents go straight on, and the page before it ends the form if it was the last one.
  • A form without sections stays one page, exactly as before.
  • Existing jumps into the middle of a section keep working: the questions join the current page. A later PR in this stack limits targets to the start of a section.
  • Ctrl+Enter moves to the next page; Enter in a single-line input skips the Back button.

Screenshots

Before After, page 1 After, page 2
Before: the section and all questions on one page After: page 1 with the first question and Next After: page 2 with the section, its questions, Back and Submit

Tests

  • e2e: pages, Next checks required questions per page, Back keeps answers, a section without questions as an info page, skipping a section with nothing to show, and a jump into the middle of a section. The existing 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

Copy link
Copy Markdown
Member Author

Heading outline update: the form title stays at the top of every page, a section is an h3 and the questions of a section are h4 below it (questions before the first section and forms without sections keep h3). After Next and Back the focus moves to the section heading. Checked live on NC 36, logged in, through a public link and embedded: no skipped heading levels, and axe reports nothing in the form content.

Outline on the second page: h1 Submit form → h2 Form with sections → h3 About you → h4 City, h4 Age

Public link, last page Embedded, last page
Public link: form title above the section Feedback and its question Comments Embedded: form title above the section Feedback and its question Comments

Assisted by Claude Code:claude-opus-5-5

@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch 2 times, most recently from 29258ef to 76d0464 Compare November 24, 2026 11:05
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from 76d0464 to 9eae39a Compare November 24, 2026 11:17
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from 9eae39a to de5efb6 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/add-new-type-section-continue branch from e6be8c9 to 2704516 Compare November 27, 2026 20:29
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from 2704516 to ea506f5 Compare November 27, 2026 20:33
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from ea506f5 to e684174 Compare November 28, 2026 11:06
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from e684174 to ed99c85 Compare November 30, 2026 13:51
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from ed99c85 to 56b08bc Compare December 1, 2026 07:23
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from 56b08bc to 093f8cc Compare December 1, 2026 09:37
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from 093f8cc to 3175b51 Compare December 1, 2026 14:20
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from 3175b51 to 341f835 Compare December 1, 2026 15:56
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from 341f835 to 1b711bd Compare December 1, 2026 17:34
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from 1b711bd to 596aa7e Compare December 1, 2026 19:26
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from 596aa7e to c78852a Compare December 2, 2026 08:41
A form with sections becomes a sequence of pages: each section starts a
page, questions before the first section form the first one. Next
checks only the questions of the current page, Back keeps the answers,
and Submit appears on the last page of the respondent's path, which
follows the answers as before. A form without sections stays a single
page. The form title heads every page, so the heading of a section and
those of its questions keep their place in the outline.

A jump into the middle of a section adds its questions to the current
page, so existing jumps keep working until jump targets are limited to
the start of a section.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger
AndyScherzinger force-pushed the feat/add-new-type-section-continue branch from c78852a to 9132862 Compare December 2, 2026 08:54
@AndyScherzinger
AndyScherzinger marked this pull request as ready for review December 2, 2026 09:00
@AndyScherzinger AndyScherzinger added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Dec 2, 2026
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