Move exit pages to condition - #3006
Merged
Merged
Conversation
We still want to use the name exit page for new code using the new ExitPage mode. The existing routes won't be used, as they are tied to conditions and the condition id. In the new model, exit pages rely on page id instead. To allow us to create the new routes, controller and views, we moved the existing exit page controller to be under the Condition namespace. We could have left in under page and used a different name. I think it would get confusing though, so we move it.
Also change path helpers to match the new route structure.
thomasiles
marked this pull request as ready for review
August 5, 2026 15:06
lfdebrux
previously approved these changes
Aug 6, 2026
lfdebrux
left a comment
Contributor
There was a problem hiding this comment.
Changes makes sense to me, and work on my machine
lfdebrux
reviewed
Aug 6, 2026
lfdebrux
reviewed
Aug 6, 2026
Ensure the correct translations are being called from views. Co-authored-by: Laurence de Bruxelles <laurence.debruxelles@digital.cabinet-office.gov.uk>
lfdebrux
reviewed
Aug 6, 2026
lfdebrux
left a comment
Contributor
There was a problem hiding this comment.
Another hidden issue, sorry
Co-authored-by: Laurence de Bruxelles <laurence.debruxelles@digital.cabinet-office.gov.uk>
When changing a condition from an exit_page we need to use the correct path. Co-authored-by: Laurence de Bruxelles <laurence.debruxelles@digital.cabinet-office.gov.uk>
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-3006.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 For the sign in details and more information, see the review apps wiki page. |
lfdebrux
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move the existing exit page controllers and input objects out the way
Trello card: https://trello.com/c/gecvdskV/3173-change-add-edit-delete-exit-page-to-work-with-multiple-branches
We are changing how exit pages are created, updated and deleted for the multiple branch feature.
We can't delete the existing exit pages code because they are still being used in production until we switch to multiple branch routing.
To add the new exit page routes for multiple branches we need to move the existing code out of the way. We are moving it instead of adapting it because there are differences in the new implementation, such as not depending on conditions.
When the new routes for exit pages have been added and the multiple branches feature is released, we will be able to remove the exit page code under conditions.
This PR shouldn't create any difference in how the product behaves. It's a code refactor to make implementing exit pages for multiple branches easier.
Details
This is split into commits. The main changes are moving the controller under Condition, instead of Page and moving input objects.
The URLs for exit pages don't change but the path helpers have. We go through the code and tests to update them to the new values.
To move the input objects, we need to change the locales to match and check the controllers expect the correct params. Both depend on the name of the input object.
Whilst this PR is big, most of the changes are just altering the names of things.
Things to consider when reviewing