Skip to content

Combine Sign-In/Sign-Up and Teacher Account Required gates into distinct pages #66351

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

Merged
merged 11 commits into from
Jun 11, 2025

Conversation

TurnerRiley
Copy link
Contributor

@TurnerRiley TurnerRiley commented Jun 5, 2025

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:

  • /logged_out?source_page=[name of source page for logging]&return_to=[url to bring user back to]
  • /teacher_account_required?source_page=[name of source page for logging]&return_to=[url to bring user back to]

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 the return_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.

@TurnerRiley TurnerRiley requested a review from a team June 6, 2025 20:10
Copy link
Contributor

@drizco drizco left a comment

Choose a reason for hiding this comment

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

lgtm! I love the cleanup and consolidation of components that can be reused

@TurnerRiley TurnerRiley merged commit b14d7d6 into staging Jun 11, 2025
6 checks passed
@TurnerRiley TurnerRiley deleted the combine-sign-in-gating-pages branch June 11, 2025 16:51
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