Combine Sign-In/Sign-Up and Teacher Account Required gates into distinct pages #66351
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.
There are two places we currently use the simple signed-out or student gating components: joining sections and workshop enrollments. They had virtually identical components and we needed a way to be able to show these views easily upon clicking a button, so it made sense to just combine these into two pages so they can more easily be re-used elsewhere.
As part of this, I also removed the "Cancel" button that was on the teacher upgrade view because it had originally just been copied over from the LTI Link Account component and just functioned to cancel the creation of a user mid-sign-up. I'm happy to bring it back if desired, but I imagine if we want a button to take the user back to where they were we'd probably want that to be the link of the "Keep student account" card's button (instead of it sending the user to studio.code.org/home).
The sign-up/sign-in gate will live at
/logged_out
and the gate telling students they must be teachers to view will live at/teacher_account_required
. This should make it easier to show the gates by just sending the user to one of the following links:Note: Uses of these URL's will require the parameters to be encoded since all of the logging
source_page
values used already have a space in them (e.g. "join section" and "workshop enroll") and thereturn_to
URL's will have forward slashes.Workshop enrollment
Signed-out user tries to enroll:
SignedOutEnroll.mp4
Student tries to enroll:
UpgradeAccountEnroll.mp4
Joining a section
Signed-out user tries to enroll:
CreateAccountJoinSection.mp4
Student user tries to enroll in a section for teachers then upgrades account:
JoinTeacherSection.mp4
Student user tries to enroll in a section for teachers then declines upgrade:
NoUpgrade.mp4
Links
Jira ticket: here
Testing story
Local testing and updating/adding unit tests.