Skip to content

Access page_slug from page inside Step class#1597

Merged
theseanything merged 1 commit intomainfrom
remove-page-slug
Aug 21, 2025
Merged

Access page_slug from page inside Step class#1597
theseanything merged 1 commit intomainfrom
remove-page-slug

Conversation

@theseanything
Copy link
Contributor

This removes the separate page_slug instance variable, which was passed into the initializer for Step via the StepFactory. As the original Page object is also passed in, we can reference it directly from that object.

This helps simplify the code and makes it easier for future refactoring.

@theseanything theseanything force-pushed the remove-page-id-and-slug branch from 227183a to e6e3b97 Compare August 19, 2025 13:52
Base automatically changed from remove-page-id-and-slug to main August 19, 2025 14:24
@theseanything theseanything force-pushed the remove-page-slug branch 3 times, most recently from 9d1bfa4 to 31d1f37 Compare August 20, 2025 10:48
This removes the separate page_slug instance variable, which was
passed into the initializer for Step via the StepFactory. As the
original Page object is also passed in, we can reference it directly
from that object. This helps simplify the code and makes it easier for
future refactoring.

`page_slug` will always equal the `page.id` as the StepFactory matches
them, otherwise it raises an error.
@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

🎉 A review copy of this PR has been deployed! It is made of up two components

  1. A review copy of forms-runner
  2. A production copy of forms-admin

Important

Not all of the functionality of forms-runner is present in review apps.
Functionality such as sending emails, file upload, and S3 submission types are
deliberately disabled for the sake of simplifying review apps.

You should use the full dev environment to test the functionality which is disabled here.

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.

Copy link
Contributor

@stephencdaly stephencdaly left a comment

Choose a reason for hiding this comment

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

Changes make sense, it's nice to get rid of this duplication. As discussed it would be good to rename all the parameters called page_slug next.

@theseanything theseanything merged commit 159fcce into main Aug 21, 2025
10 checks passed
@theseanything theseanything deleted the remove-page-slug branch August 21, 2025 10:04
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.

2 participants