Skip to content

feat: tell editors and respondents about answers no longer offered - #4029

Merged
AndyScherzinger merged 2 commits into
mainfrom
feat/edit-warning-existing-responses
Nov 25, 2026
Merged

AndyScherzinger merged 2 commits into
mainfrom
feat/edit-warning-existing-responses

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Follow-up to the discussion in #3978 (comment): when the options of a question or the range of a linear scale change after responses came in, neither the editor nor the respondent is told about the consequences.

Screenshots

👀 Before After
Editor 🌞 forms-pr4029-before-editor-light forms-pr4029-after-editor-light
Editor 🌚 forms-pr4029-before-editor-dark forms-pr4029-after-editor-dark
Reopened response 🌞 forms-pr4029-before-submission-light forms-pr4029-after-submission-light
Reopened response 🌚 forms-pr4029-before-submission-dark forms-pr4029-after-submission-dark
Unsent draft, all three changes 🌞 forms-pr4029-before-draft-all-changes-light forms-pr4029-after-draft-all-changes-light
Unsent draft, all three changes 🌚 forms-pr4029-before-draft-all-changes-dark forms-pr4029-after-draft-all-changes-dark

Summary

  • Editor: once a form has responses, the editor shows a warning above the questions: changing the options, rows or columns of a question, or the range of a linear scale, does not change the existing responses, and answers that are no longer offered stay in the results.
  • Respondent: when a respondent reopens a submitted response, or returns to an unsent draft, the form already leaves out earlier answers the questions no longer offer (removed options, grid rows or columns, values outside a changed linear scale). This happened silently; the dialog that already reports answers to deleted questions ("The form has changed since your last visit") now also opens in this case and lists the affected questions, next to the offer to clear the form. When answered questions were deleted, the dialog says so in a sentence of its own; this only applies to unsent drafts, as the server leaves answers to deleted questions out of a reopened response since fix: unify checks for deleted questions and don't load submissions to deleted questions #4017.

The warning applies to every question type with predefined answers, not only the linear scale. Forms does not record when a question changed, so the note can only say that an answer is no longer offered, not why. An editor without access to the results gets no response count from the server, so they see no warning.

How to verify

  1. Create a form with a linear scale from 1 to 7 and a radio question, allow editing responses, and submit a response with 6 and one of the radio options.
  2. Open the editor: the warning about the existing response shows above the questions. A form without responses shows none.
  3. Lower the highest value of the scale to 5 and delete the chosen radio option.
  4. Reopen the submitted response: the "Clear form" dialog lists both questions; after "Abort" their earlier answers are cleared and the other answers stay.

Testing

  • Playwright: the editor warning with and without responses (question-editing.spec.ts), and the dialog on a restored draft and on an edited response, plus no dialog when nothing was removed (submit-form.spec.ts)
  • ESLint, stylelint, Prettier, vue-tsc and the build pass

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Changing the options, rows or columns of a question, or the range of a
linear scale, leaves the existing responses as they are, so answers
that are no longer offered stay in the results. Tell editors so once
the form has responses.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger added this to the 5.5 milestone Nov 25, 2026
@AndyScherzinger
AndyScherzinger marked this pull request as ready for review November 25, 2026 09:43
@AndyScherzinger AndyScherzinger added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Nov 25, 2026

@Chartman123 Chartman123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice :) I like the way of showing the information to the editor :) For the respondent see the comment on the changes to Submit.vue

Comment thread src/views/Submit.vue Resolved
@AndyScherzinger
AndyScherzinger force-pushed the feat/edit-warning-existing-responses branch from 13b5cc5 to 8161ff6 Compare November 25, 2026 11:47
Reopening a submitted response or an unsent draft leaves out the
answers the questions no longer offer, such as removed options or
values outside a changed linear scale. This happened silently, so
open the dialog that already reports answers to deleted questions and
list the affected questions there, next to the offer to clear the form.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger
AndyScherzinger force-pushed the feat/edit-warning-existing-responses branch from 8161ff6 to b2bb66b Compare November 25, 2026 15:14
@AndyScherzinger

Copy link
Copy Markdown
Member Author

@Chartman123 I added two screenshot rows to the description for the combined case: an unsent draft where one answered question was deleted, the chosen radio option was deleted and the scale range was lowered below the given value. The dialog now reports all of it in one place: a sentence for answers to deleted questions (they can't be named, as the question is gone) and a list of the questions whose answers are no longer offered, followed by the existing offer to clear the form (b2bb66b).

One limit: since #4017 the server leaves answers to deleted questions out of a reopened response, so that sentence only shows for unsent drafts; a reopened response still lists removed options and out-of-range values.

Assisted by ClaudeCode:claude-opus-5-5

@Chartman123 Chartman123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine from my side :) Perhaps a quick design review regarding the NcDialog?

@AndyScherzinger
AndyScherzinger merged commit 11eb0bf into main Nov 25, 2026
43 checks passed
@AndyScherzinger
AndyScherzinger deleted the feat/edit-warning-existing-responses branch November 25, 2026 15:34
@AndyScherzinger

Copy link
Copy Markdown
Member Author

Design und Dialog could be a other follow up, doesn't look worse than before but should receive some polishing love

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.

2 participants