-
Notifications
You must be signed in to change notification settings - Fork 14
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
(getgov-za) Ticket #2047: Force new users to finish setting up profile #2168
base: main
Are you sure you want to change the base?
Conversation
Still needs some cleanup
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
function showInputOnErrorFields(){ | ||
document.addEventListener('DOMContentLoaded', function() { | ||
// Get all input elements within the form | ||
let form = document.querySelector("#finish-profile-setup-form"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is using an ID because of where it is in the DOM. Its more reliable this way and less reliant on either an underyling object or otherwise - and it ensures this code doesn't get run elsewhere
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
|
||
# In some cases, we don't want to redirect to home. This handles that. | ||
# Can easily be generalized if need be, but for now lets keep this easy to read. | ||
custom_redirect = "domain-request:" if request.path == "/request/" else None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This coerces the request path to a given viewname.
Basically, the point is that it gives us a mapping that we have direct control over rather than just blindly accepting all input. If we need to change this we can, but I advocate to keep the scope of change small until we determine we need more functionality
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
1 similar comment
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
🥳 Successfully deployed to developer sandbox za. |
Ticket
Resolves #2047
Changes
Context for reviewers
Note: This ticket requires #1807. The content of that PR is merged into this one.
This PR adds a "Finish profile setup" page for new users under two circumstances:
In addition, this PR is intended to redirect the user to their original, desired destination. This means that if the user clicks the "start your domain request" button on get.gov, they will be redirect to the start a new domain request page. Otherwise, they'll be redirected to home. For now, just domain request and home are supported as design would want custom content for other pages if it becomes something we want to consider.
It is toggleable with the profile_feature waffle flag in Django Admin. This is off by default so set it to
everyone
.Setup
Code Review Verification Steps
As the original developer, I have
Satisfied acceptance criteria and met development standards
Ensured code standards are met (Original Developer)
Validated user-facing changes (if applicable)
As a code reviewer, I have
Reviewed, tested, and left feedback about the changes
Ensured code standards are met (Code reviewer)
Validated user-facing changes as a developer
New pages have been added to .pa11yci file so that they will be tested with our automated accessibility testing
Checked keyboard navigability
Meets all designs and user flows provided by design/product
Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
Tested with multiple browsers, the suggestion is to use ones that the developer didn't (check off which ones were used)
(Rarely needed) Tested as both an analyst and applicant user
Note: Multiple code reviewers can share the checklists above, a second reviewers should not make a duplicate checklist
As a designer reviewer, I have
Verified that the changes match the design intention
Validated user-facing changes as a designer
Checked keyboard navigability
Tested general usability, landmarks, page header structure, and links with a screen reader (such as Voiceover or ANDI)
Tested with multiple browsers (check off which ones were used)
(Rarely needed) Tested as both an analyst and applicant user
Screenshots