-
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
Forgot password backend logic + frontend design #73
Conversation
…into jeffrey/course-unit-view
@AbeerDas Is the button colour supposed to become blue on hover, or should it be a darker green? I'm seeing this on hover right now: |
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.
Great first PR!! 😎 Everything works as described and matches the design! 💪
I left a few comments - we can go over them at tonight's work sesh :D
Some general things:
- There's a few linter errors - could you run
./scripts/run_linter
(assuming you have Docker running - if not, you can runyarn fix
underfrontend/
andbackend/
)? You might need to resolve some of the linter complaints manually, but this should be quick :) - We have some theming set up for the app already - there are some styles you've hardcoded that we should be able to replace with things already in our theme :)
@@ -33,7 +33,7 @@ baseAPIClient.interceptors.request.use(async (config: AxiosRequestConfig) => { | |||
decodedToken.exp <= Math.round(new Date().getTime() / 1000)) | |||
) { | |||
const { data } = await axios.post( | |||
`${process.env.REACT_APP_BACKEND_URL}/auth/refresh`, | |||
`${process.env.REACT_APP_BACKEND_URL}auth/refresh`, |
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.
hmmmm this might break things 🤔
I have REACT_APP_BACKEND_URL="http://localhost:8080"
as my env variable, which wouldn't pair well without the /
package.json
Outdated
{ | ||
"devDependencies": { | ||
"nodemon": "^3.1.7" | ||
} | ||
} |
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.
was this file added by accident? :D
frontend/src/App.tsx
Outdated
const link = document.createElement("link"); | ||
link.href = "https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@400;600&display=swap"; | ||
link.rel = "stylesheet"; | ||
document.head.appendChild(link); | ||
|
||
const theme = createTheme({ | ||
typography: { | ||
fontFamily: "'Lexend Deca', sans-serif", | ||
}, | ||
}); |
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.
Design question - is Lexend Deca the only font used throughout our app?
If yes, I think it would be better to plop this theming into frontend/src/theme/theme.ts
:)
If no... then we might need to get more creative lol
frontend/src/App.tsx
Outdated
<ThemeProvider theme={theme}> | ||
<CssBaseline /> |
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.
We have ThemeProvider
in index.tsx
that's grabbing the theme from frontend/src/theme/theme.ts
already. It'd be best to only have this in one place, so adding onto my comment above - if we can put the new font in our existing theme, then we can use our existing theming!
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.
Looks and works great! After Carolyn's comments resolved and linter run, LGTM 🚀
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.
looks great to me! everything works like it should so i think that's awesome!
one small thing i noticed, not really sure if it's important, but is nice for consistency. When you hover over the "Not your email...." link, the background of that is slightly highlighted but when you hover over the "Remember your password..." link, that's not the case. Take a look and let me know what you think. Besides that, there seems to be some github linting things coming up but i dont think that's a huge deal.
Awesome work abeer! 💯
Everything looks good to me. All functionalities work!! There was the issue with the background when hovering on the "send reset link to email" but I think Carolyn commented on that. Great work 🤩 |
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.
WOOHOO SUPER DUPER AMAZING 🧑🍳🧑🍳🧑🍳
Notion Ticket Link
Reset Password Page Design Implementation
NEW COMMIT DETAILS
Do the reset password thing but then after it should show a page with a button that counts down from 30 seconds, then sends another email when clicked again. This button should not be clickable before 30 seconds passes. The pages should look like this. Check login dev handoff page for more information if needed.
When clicked this should be the notification that shows up top-center:
I also fixed all the bugs listed by everyone on the thread (thanks everyone). Including the one about the hover showing colours for some of the buttons. Now no colour shows, the cursor just points.
I was thinking in the future we add standardization for the snackbar placement (top-center for all), snackbar colours (Gaurav says there would be three: Sucess, Error, and Info [e.g. the one in this example]). We should also have standardized fonts.
Also, I changed the bodySmall to 12.5px because we do not use 12px anywhere on our designs and having it be 12.5px is the variable that matches the figma designs and it would be better.
Implementation Description
This PR implements the design for the Reset Password page as specified in the Notion ticket. The functionality includes sending a reset link to the user's email and providing navigation options based on the user's authentication state.
Steps to Test
4. Click "Not your email?".
5. Click "Remember Your Password?".
After logging in, navigate back to http://localhost:3000/forgot-password.
Review Focus Areas
Checklist