-
Notifications
You must be signed in to change notification settings - Fork 897
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import Link from "@mui/material/Link"; | ||
import Button from "@mui/material/Button"; | ||
import GitHubIcon from "@mui/icons-material/GitHub"; | ||
import KeyIcon from "@mui/icons-material/VpnKey"; | ||
|
@@ -26,49 +25,47 @@ export const OAuthSignInForm: FC<OAuthSignInFormProps> = ({ | |
return ( | ||
<Box display="grid" gap="16px"> | ||
{authMethods?.github.enabled && ( | ||
<Link | ||
<Button | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the trade-off between having an MUI 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ps: Link when it is from I use |
||
component="a" | ||
href={`/api/v2/users/oauth2/github/callback?redirect=${encodeURIComponent( | ||
redirectTo, | ||
)}`} | ||
variant="contained" | ||
startIcon={<GitHubIcon css={iconStyles} />} | ||
disabled={isSigningIn} | ||
fullWidth | ||
type="submit" | ||
size="xlarge" | ||
> | ||
<Button | ||
startIcon={<GitHubIcon css={iconStyles} />} | ||
disabled={isSigningIn} | ||
fullWidth | ||
type="submit" | ||
size="large" | ||
> | ||
{Language.githubSignIn} | ||
</Button> | ||
</Link> | ||
{Language.githubSignIn} | ||
</Button> | ||
)} | ||
|
||
{authMethods?.oidc.enabled && ( | ||
<Link | ||
<Button | ||
component="a" | ||
href={`/api/v2/users/oidc/callback?redirect=${encodeURIComponent( | ||
redirectTo, | ||
)}`} | ||
variant="contained" | ||
size="xlarge" | ||
startIcon={ | ||
authMethods.oidc.iconUrl ? ( | ||
<img | ||
alt="Open ID Connect icon" | ||
src={authMethods.oidc.iconUrl} | ||
css={iconStyles} | ||
/> | ||
) : ( | ||
<KeyIcon css={iconStyles} /> | ||
) | ||
} | ||
disabled={isSigningIn} | ||
fullWidth | ||
type="submit" | ||
> | ||
<Button | ||
size="large" | ||
startIcon={ | ||
authMethods.oidc.iconUrl ? ( | ||
<img | ||
alt="Open ID Connect icon" | ||
src={authMethods.oidc.iconUrl} | ||
css={iconStyles} | ||
/> | ||
) : ( | ||
<KeyIcon css={iconStyles} /> | ||
) | ||
} | ||
disabled={isSigningIn} | ||
fullWidth | ||
type="submit" | ||
> | ||
{authMethods.oidc.signInText || Language.oidcSignIn} | ||
</Button> | ||
</Link> | ||
{authMethods.oidc.signInText || Language.oidcSignIn} | ||
</Button> | ||
)} | ||
</Box> | ||
); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,9 +37,6 @@ export const WithError: Story = { | |
}, | ||
], | ||
}), | ||
initialTouched: { | ||
password: true, | ||
}, | ||
}, | ||
}; | ||
|
||
|
This file was deleted.
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.
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'ssize
prop becomesbuiltInType | "xlarge"
?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.
Exactly!