Skip to content

feat: Login/Signup UI Page and Corresponding Handling Functions#58

Merged
cbolles merged 14 commits intomainfrom
feature/Maolin-Wei/Login-Signup-UI
Apr 10, 2024
Merged

feat: Login/Signup UI Page and Corresponding Handling Functions#58
cbolles merged 14 commits intomainfrom
feature/Maolin-Wei/Login-Signup-UI

Conversation

@Maolin-Wei
Copy link
Collaborator

@Maolin-Wei Maolin-Wei commented Mar 7, 2024

  • Completed the UI Pages for Signup, Login and Password-Reset, including buttons, styles, etc.
  • Completed the functions for handling user Signup, Login and Password-Reset.
  • Completed the drop down UI menu to display list of organizations users may choose to login with.
  • Support both English and Spanish for the Auth page.

Copy link
Contributor

@cbolles cbolles left a comment

Choose a reason for hiding this comment

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

Nice start! I added in my comments, some high level things to consider

  1. Leverage MUI for the components, you'll notice in the code base there is little to no plain HTML tags and that's because MUI handles thinks like being dynamic, follow global styling, and solve common HTML problems out of the box.
  2. You shouldn't need much custom CSS thanks to MUI
  3. Instead of using react routing, the authentication should be implemented as a single page.

Overall great work and let me know if you need any assistance!

@Maolin-Wei Maolin-Wei requested a review from cbolles March 18, 2024 19:26
Copy link
Contributor

@cbolles cbolles left a comment

Choose a reason for hiding this comment

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

Another good step in the right direction, I think there may also be some benefit in some group programming. MUI can actually handle a lot of the tricky parts.

maxWidth="sm"
sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '80vh' }}
>
<NavigationSidebar />
Copy link
Contributor

Choose a reason for hiding this comment

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

Can remove the sidebar

)}
{authenticated && children}
</AuthContext.Provider>
<Container
Copy link
Contributor

Choose a reason for hiding this comment

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

With the switch to have a lot of view logic in this component, its becoming difficult to reason through.

For example, you'll notice after you login that the tabs of the login logic are still visible over the rest of the webpage. I'd recommend either making an Auth.component to store the tab view or move the tab view into the Firebase wrapper.

</AuthContext.Provider>
<Container
maxWidth="sm"
sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', height: '80vh' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I see this used in a few places, you probably want to checkout the MUI Stack component for column oriented views

}

// Login Page Component
const LoginComponent: FC<LoginComponentProps> = ({ auth, onLoginSuccess }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency with the project, having things exported via export const LoginComponent instead of having a default export

@Maolin-Wei Maolin-Wei requested a review from cbolles March 23, 2024 00:05
Copy link
Contributor

@cbolles cbolles left a comment

Choose a reason for hiding this comment

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

Looks great! Excellent job. Good job sticking with it and adding in those improvements!

@cbolles cbolles merged commit b18cb68 into main Apr 10, 2024
@cbolles cbolles deleted the feature/Maolin-Wei/Login-Signup-UI branch April 10, 2024 19:47
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