-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a PageRepository and reroute Page model usage through it #1587
Open
SamJamCul
wants to merge
3
commits into
main
Choose a base branch
from
1939-add-repository-service-to-forms-admin-for-form-page-model
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add a PageRepository and reroute Page model usage through it #1587
SamJamCul
wants to merge
3
commits into
main
from
1939-add-repository-service-to-forms-admin-for-form-page-model
Conversation
This file contains 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
SamJamCul
commented
Nov 11, 2024
SamJamCul
commented
Nov 11, 2024
SamJamCul
force-pushed
the
1939-add-repository-service-to-forms-admin-for-form-page-model
branch
from
November 11, 2024 16:51
e20d3bb
to
ffad1e4
Compare
lfdebrux
reviewed
Nov 12, 2024
lfdebrux
reviewed
Nov 12, 2024
SamJamCul
force-pushed
the
1939-add-repository-service-to-forms-admin-for-form-page-model
branch
2 times, most recently
from
November 12, 2024 16:20
82497b0
to
7f71685
Compare
Removing tests that were specifically designed to operate during the implementation for the `Add another answer` feature. These test are no longer useful, as the attribute that they're focused on, `is_repeatable` behaves as any other attribute.
The PageRepository being introduced is used as an interface between the application and any Page method calls that result in an API call through ActiveResource. The intention is to create a layer of separation, so that database requests can be rerouted more easily as part of the Admin/API responsibilities shifting.
The delete confirmation controller handles the deletion process for forms and pages - but the tests only covered the form deletion process. Adds tests for the page versions of the delete and destroy actions
SamJamCul
force-pushed
the
1939-add-repository-service-to-forms-admin-for-form-page-model
branch
from
November 15, 2024 12:09
7f71685
to
9b95b1c
Compare
Quality Gate passedIssues Measures |
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.
The PageRepository being introduced is used as an interface between the application and any Page method calls that result in an API call through ActiveResource. The intention is to create a layer of separation, so that database requests can be rerouted more easily as part of the Admin/API responsibilities shifting.
What problem does this pull request solve?
Trello card: https://trello.com/c/QuEeu8uI/1939-add-repository-service-to-forms-admin-for-form-page-model
This PR adds the PageRepository, which is intended to act as a buffer between the app and any ActiveResource API usage when using the Page model. I've tried to go through and find all the spots where we use Page model requests, it's a little fiddly!
As well as CRUD ops, it also implements the
move_page
, as this also hooks into the API.If you know of anywhere else that we use the API's Page model, please leave a comment and I'll reroute it through the PageRepository.
Things to consider when reviewing