Skip to content
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

Confirmation refactor #214

Merged
merged 17 commits into from Jun 10, 2018
Merged

Confirmation refactor #214

merged 17 commits into from Jun 10, 2018

Conversation

ehsanmasdar
Copy link
Member

@ehsanmasdar ehsanmasdar commented May 8, 2018

When we accept a user we assign them to a specific confirmation branch (and only one confirmation branch). Each confirmation branch is an option in the state dropdown.

Instead of sending an acceptance email for the application branch, we send a pre-confirm email for the confirmation branch. This allows us to alter the message text for each branch.

Waitlist/Rejected edge cases:
Waitlist can operate as a normal confirmation branch if we have users confirm their spot on the waitlist. Rejected can be implemented by a simple no-op confirmation branch that does not require any user action (this is also necessary for supporting the walk-up feature). A flag on each branch can indicate if this confirmation represents "success" or "failure", for the purposes of ensuring we only check-in accepted students.

The only reduction in functionality here is that users can no longer choose from multiple confirmation branch.

This PR implements the above changes. Some notes/other additions:

  1. Simplifies handling of redirects in the application
  2. Rewrite portions of the user dashboard to provide clearer, more consistent view of status
  3. Modifications to the GraphQL API (attending is now confirmed)
  4. Changes the concept of accepted. accepted now simply indicates if the user has been assigned a confirmation branch that we define as an accepted branch. A user could, for example, confirm to the waitlist but not be accepted.
  5. Admin changes:
    a. Application branches no longer include a whitelist of confirmation branches
    b. Application branch automation now configurably can automatically set a user's confirmation decision
    c. Confirmation branches now have a flag to auto-confirm. This functions like a no-op, the user never recieves a post-confirm email and cannot edit/submit the branch.
    d. Application branches no longer include a whitelist of confirmation branches
    e. Refactor the search filters to fit this new model.
  6. Alter the default list of questions to allow for a good test of the new flow.

Fixes #110, fixes #117, fixes #150, fixes #156, fixes #206, fixes #208, fixes #209, fixes #211

@hackgbot
Copy link

hackgbot commented May 8, 2018

Hey y'all! A deployment of this PR can be found here:
https://registration-walk-up-fixes.pr.hack.gt

@@ -205,8 +205,9 @@ export function branchRedirector(requestType: ApplicationType): (request: expres
response.redirect(`/confirm/${encodeURIComponent(user.confirmationBranch.toLowerCase())}`);
return;
}
// TODO why is this !user.attending?
if (questionBranches.indexOf(branchName.toLowerCase()) === -1 && !user.attending) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@bunsenmcdubbs @petschekr Can you clarify why !user.attending is here.

When we accept a user we assign them to a specific confirmation branch (and only one confirmation branch). Each confirmation branch is an option in the state dropdown.

Instead of sending an acceptance email for the application branch, we send a pre-confirm email for the confirmation branch. This allows us to alter the message text for each branch.

Waitlist/Rejected edge cases:
Waitlist can operate as a normal confirmation branch if we have people confirm their spot on the waitlist. Rejected can be implemented by a simple no-op confirmation branch that does not require any user action (this is also necessary for supporting the walk-up feature). A flag on each branch can indicate if this confirmation represents "success" or "failure", for the purposes of ensuring we only check-in accepted students.

The only reduction in functionality here is that users can no longer choose from multiple confirmation branch. In my opinion, this isn't necessary for us and only lead to confusion when different confirmation branches had different deadlines.
@ehsanmasdar ehsanmasdar changed the title Fixes for walk-up registration and branches Confirmation refactor May 12, 2018
@petschekr petschekr added enhancement Adds or suggests a new feature, rewrite, or other enhancement to the codebase high priority pending review This PR is pending review by a maintainer labels May 15, 2018
@petschekr petschekr added this to the Midsummer HackGT 5 milestone May 15, 2018
Fixes lowercase branch names crashing the server when navigating to the apply or confirm forms
@@ -229,7 +236,7 @@ export function branchRedirector(requestType: ApplicationType): (request: expres
}
}
if (requestType === ApplicationType.Confirmation) {
if (request.params.branch !== user.confirmationBranch ) {
if (!user.accepted || branchName.toLowerCase() !== (user.confirmationBranch || "").toLowerCase()) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@petschekr user.accepted is not an indicator of if the user has been assigned a confirmation branch, it's better to check if user.confirmationBranch is defined.

Copy link
Member

@petschekr petschekr Jun 5, 2018

Choose a reason for hiding this comment

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

@ehsanmasdar Thanks for pointing that out. Does everything in 2e2bd7d make sense now with the distinction between confirmed and attending?

@petschekr petschekr removed the pending review This PR is pending review by a maintainer label Jun 5, 2018
Fixes missing space in formatted application submission success message and removes "We look forward to seeing you" because the message is also shown for rejected applicants.
Copy link
Member

@petschekr petschekr left a comment

Choose a reason for hiding this comment

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

@ehsanmasdar I made a bunch of small fixes to this PR. Could you please look them over before we merge this? Overall, this is great, resolves a ton of issues, makes the code more maintainable, and is simpler to use. Thanks!

- Scroll to top of page on successful submission
- Properly slugify anonymous submission links in the admin panel
- Set a title on branch names in the admin panel that might be truncated due to limited column width
Breaking API and UX changes for admins and users
@ehsanmasdar
Copy link
Member Author

@petschekr Your changes look good. I'd like to get this reviewed at least one more time considering the scope of changes, @kexin-zhang could you take a look.

@petschekr petschekr added the blocking This issue or PR is blocking other progress on registration and should receive priority label Jun 6, 2018
Copy link
Member

@kexin-zhang kexin-zhang left a comment

Choose a reason for hiding this comment

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

Sorry for taking so long to get to this, but the changes look good to me and this is a huge improvement. Thanks y'all! Feel free to merge when ready

@petschekr petschekr merged commit de52600 into master Jun 10, 2018
@petschekr petschekr deleted the walk-up-fixes branch February 25, 2019 18:44
rahulrajus pushed a commit that referenced this pull request Jul 22, 2021
Confirmation refactor
SEMVER-MAJOR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking This issue or PR is blocking other progress on registration and should receive priority enhancement Adds or suggests a new feature, rewrite, or other enhancement to the codebase high priority
Projects
None yet
4 participants