Skip to content

Add routes section to edit question - #3229

Open
SamJamCul wants to merge 3 commits into
mainfrom
add-routes-section-to-edit-question
Open

SamJamCul wants to merge 3 commits into
mainfrom
add-routes-section-to-edit-question

Conversation

@SamJamCul

@SamJamCul SamJamCul commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

Trello card: https://trello.com/c/Yp8LZhTj/3291-add-routing-content-to-edit-question-screen-for-saved-questions

Adds a routes section to the edit questions page. This appears under certain conditions, with different content.

For a selection option only one answer question with no routes and 10 or fewer selection options

image

For any question that qualifies for unconditional routes (not select only one option (unless it has more than 10 options) and not the last question in the form)

image

For any question with routes

image

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The section bypasses the routing feature flag and advertises actions unavailable for some question configurations.

3 open findings
What changed in this PR

Adds routing information and links to the saved-question editing screen.

Changes:

  • Shows routing guidance based on question type, position, and existing routes.
  • Adds translated content and view specs for the new section.
File Description
spec/​views/​pages/​edit.html.erb_spec.rb Tests routing messages, links, and visibility.
config/​locales/​en.yml Adds routes-section heading and messages.
app/​views/​pages/​_form.html.erb Conditionally displays the routes section.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/views/pages/_form.html.erb
Comment thread app/views/pages/_form.html.erb Outdated
Comment thread app/views/pages/_form.html.erb
@SamJamCul
SamJamCul force-pushed the add-routes-section-to-edit-question branch 2 times, most recently from 28991a8 to 784e2cd Compare October 16, 2026 11:29
SamJamCul and others added 3 commits October 16, 2026 12:36
Add a routes section to edit question page, which only appears if it's a
selection question with only one option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Questions that aren't selection questions with only one option can
have unconditional routes, which let people skip later questions.
Show a section on the edit question page for these questions,
linking to the question's routes.

The section isn't shown on the last question in the form, as there
are no later questions to skip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a question has routes, show a message in the routes section of
the edit question page saying so, with a link to edit the question's
routes.

This message appears on any question with routes, including the last
question in the form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SamJamCul
SamJamCul force-pushed the add-routes-section-to-edit-question branch from 784e2cd to bd23cc8 Compare October 16, 2026 11:37
@github-actions

Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-3229.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@lfdebrux lfdebrux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants