-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: email verification #383
Merged
Merged
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
-Move verify email page from unauthenticated to authenticated -This requires the user to login before verifying
-Conditionally redirect user after login success -If user has browser history, redirect user to previous page from browser history after login -If user has no browser history, redirect user to Jippy home page after login -This is slightly more convenient for users
-Modify the frontend messages on the verify email to sound nice -Update redirect now component to be a span that performs an onClick() function instead of just redirecting to home -Improve redirect after successful verification to selectively redirect to previous or home page depending on user's browser history -Potentially fix multiple runs of the verify backend call from the frontend(pending testing)
-Add new UnverifiedAlert component to be displayed when the user is logged in but has not verified their email
This reverts commit 8ecc937.
-Selectively display new UnverifiedAlert component below navbar when user logs in but haven't verified their email(tier_idcorresponds to that of unverified)
-Add validation for whether user is verified on the billing page -If user is unverified, disable all subscription buttons and also add the UnverifiedAlert banner to remind the user to verify their email -Only if the user is verified, then enable the subscription buttons and remove the UnverifiedAlert banner
-Generate updated client ts with openapi-ts
-Update user.tier_id to free tier after successful email verification
-Implement sending HTTP requests to the backend to complete email verification or resend email verification -Tested to be working
-Check both user.verified and user.tier_id to determine whether a user is verified instead of only checking user.tier_id
-Add query helper function for completing email verification
-Don't indefinitely stretch the width of the SubscriptionCard component as the viewport gets wider -Set max width of 400px
-Add comment about an idea for future extension of the SubscriptionCard component
-Refactor duplicate logic into a new sub-component SubscriptionDetail -This improves code readability
-Center align elements in SubscriptionCard's CardDescription
-Set height contraint of CardDescription element in SubscriptionCard component to fit content
-Add new tierIDToPrice() helper function to convert user.tier_id to their corresponding numeric prices
-Greatly simplify the use of SubscriptionCard by only taking 1 prop now -Implement internal parsing logic to obtain the various variables required to display the subscription details
-Update billing page after the SubscriptionCard component update
-Implement conditional rendering for unverified user -Now the card becomes half disabled and is themed red with an Alert warning to strongly remind the user to verify their email
-Stop conditionally rendering the 'Your Tier' section and rely on the conditional rendering inside SubscriptionCard instead
-Update ask question page to render the next Mon's date instead of hardcoding a specific date
-Refactor reused logic into a separate component for easier maintenance and code readability
-Use the existing LimitAlert to warn the user to verify their email when the user is still unverified -Use conditional rendering to display the actual, existing limit alert logic when the user is already verified
-Add unverified tier ID as a const at types/billing.ts to reduce hardcoding and ease maintenance
-Modify essay feedback page to display a new Alert when the user is unverified using conditioal rendering -Disable all text fields and the submit button to prevent an unverified user from ever submitting essays for feedback without verifying their email -In case the user somehow manages to submit essays for feedback without verifying their email, display an Alert to warn the user to verify before trying to do so
-Improve alignment of the unverified alert by adding margin above it
-Update LimitAlert component on ask page to remove red background -This standardises the background color(none) of the alert components we have so far
-Probably a merge conflict that was resolved wrongly
-Somehow syntax errors occurred after linting and an import disappeared, fix these
Tested with the full email verification workflow and works |
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.
attempt 2