Skip to content

refactor(site): refactor login screen #10768

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 2 commits into from
Nov 20, 2023
Merged

refactor(site): refactor login screen #10768

merged 2 commits into from
Nov 20, 2023

Conversation

BrunoQuaresma
Copy link
Collaborator

Before:
Screenshot 2023-11-17 at 15 08 02

After:
Screenshot 2023-11-17 at 15 08 12

@BrunoQuaresma BrunoQuaresma requested review from kylecarbs and a team November 17, 2023 18:10
@BrunoQuaresma BrunoQuaresma self-assigned this Nov 17, 2023
@BrunoQuaresma BrunoQuaresma requested review from Kira-Pilot and removed request for a team November 17, 2023 18:10
@matifali
Copy link
Member

I think we should keep the username password fields collapsed when an OAuth login is available.

@BrunoQuaresma
Copy link
Collaborator Author

Honestly, I never saw this pattern before and I find it a bit strange. If email/password is not important, it can be disabled. Make the user have to click in a button to show the form that could be displayed right away, does not sound good to me.

@matifali
Copy link
Member

@BrunoQuaresma, I am okay with the new design, too. It does look more premium ❤️. I have seen the experience I describe with other self-hosted enterprise tools, e.g., Artifactory.

Copy link
Member

@Parkreiner Parkreiner left a comment

Choose a reason for hiding this comment

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

Looks good! Just had one question for my own understanding, and one question about how the HTML semantics are set up

@@ -26,49 +25,47 @@ export const OAuthSignInForm: FC<OAuthSignInFormProps> = ({
return (
<Box display="grid" gap="16px">
{authMethods?.github.enabled && (
<Link
<Button
Copy link
Member

@Parkreiner Parkreiner Nov 20, 2023

Choose a reason for hiding this comment

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

What's the trade-off between having an MUI Button component take an anchor as its underlying component, vs using one of the <a>/<Link> elements directly?

If this is meant to act as a link, I feel like the markup should be more straightforward, but I don't know if this accounting for some edge case

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Link works well when doing internal navigation to handle react-router state changes but when it is external, I don't see why to use a Link.

Ps: Link when it is from import { Link } from "react-router-dom".

I use Link from MUI when I want to style it as a link with the blue color and decoration on hover.

@@ -31,6 +31,10 @@ declare module "@mui/material/Button" {
interface ButtonPropsColorOverrides {
neutral: true;
}

interface ButtonPropsSizeOverrides {
xlarge: true;
Copy link
Member

Choose a reason for hiding this comment

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

Just making sure I understand the overrides here: is the true value here set up as a boolean property just because of MUI's syntax?

Basically, does having xlarge: true just mean that the type of the component's size prop becomes builtInType | "xlarge"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Exactly!

@BrunoQuaresma BrunoQuaresma merged commit fbec79f into main Nov 20, 2023
@BrunoQuaresma BrunoQuaresma deleted the bq/refactor-login branch November 20, 2023 14:19
@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants