Skip to content

chore(site): Upgrade to MUI v5 #7437

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 36 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
73c3c17
Initial changes
BrunoQuaresma May 5, 2023
047c10b
Apply codemod
BrunoQuaresma May 5, 2023
0b26a9b
Apply variant mod
BrunoQuaresma May 5, 2023
d0b064a
Migrate theme options
BrunoQuaresma May 5, 2023
9a5203d
Merge branch 'main' into bq/migrate-to-muiv5
BrunoQuaresma May 8, 2023
1f078ce
Fix all TS problems
BrunoQuaresma May 8, 2023
fc683c8
Merge branch 'main' into bq/migrate-to-muiv5
BrunoQuaresma May 8, 2023
77777fb
Remove unusable test
BrunoQuaresma May 8, 2023
479ce07
Button and input text
BrunoQuaresma May 8, 2023
9dfec8f
Set typography
BrunoQuaresma May 8, 2023
50e9f22
Remove default outlined
BrunoQuaresma May 8, 2023
34d9d8d
Improve theme
BrunoQuaresma May 8, 2023
9a62dcc
Setup links
BrunoQuaresma May 8, 2023
756277e
Fix link
BrunoQuaresma May 8, 2023
5c45cf6
Fix button outlined neutral
BrunoQuaresma May 8, 2023
5ae26fa
Fix
BrunoQuaresma May 8, 2023
a1cbc12
Update workspace header
BrunoQuaresma May 8, 2023
55c0751
Merge branch 'main' into bq/migrate-to-muiv5
BrunoQuaresma May 9, 2023
168814c
Fix format
BrunoQuaresma May 9, 2023
a591559
Adjust buttons
BrunoQuaresma May 9, 2023
a4bba50
Fix table loaders
BrunoQuaresma May 9, 2023
a24edee
Few tweaks on deployment settings
BrunoQuaresma May 9, 2023
4abb23d
Fix typo
BrunoQuaresma May 9, 2023
a0bbf8f
Fix filter size
BrunoQuaresma May 9, 2023
029e658
Fix skeleton path
BrunoQuaresma May 9, 2023
367c445
Fix storybook
BrunoQuaresma May 9, 2023
9682b7b
Many storybook fixes
BrunoQuaresma May 9, 2023
82d2e53
Fix table min
BrunoQuaresma May 9, 2023
a38eb9a
Fix colors and input sizes
BrunoQuaresma May 9, 2023
9a0e553
Previous design issue
BrunoQuaresma May 9, 2023
1145725
Better workspace build state error
BrunoQuaresma May 9, 2023
7251da2
Fix type
BrunoQuaresma May 9, 2023
a3a807a
Merge branch 'main' into bq/migrate-to-muiv5
BrunoQuaresma May 10, 2023
e18c0c1
Apply Kira PR comments
BrunoQuaresma May 10, 2023
47ab467
Fix fmt
BrunoQuaresma May 10, 2023
6bb6f5b
Fix
BrunoQuaresma May 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove default outlined
  • Loading branch information
BrunoQuaresma committed May 8, 2023
commit 50e9f2294e4a0e88ce0bc20c41c8fc582ed1c87f
9 changes: 2 additions & 7 deletions site/src/components/AlertBanner/AlertBannerCtas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,15 @@ export const AlertBannerCtas: FC<AlertBannerCtasProps> = ({
{/* retry CTA */}
{retry && (
<div>
<Button
size="small"
onClick={retry}
startIcon={<RefreshIcon />}
variant="outlined"
>
<Button size="small" onClick={retry} startIcon={<RefreshIcon />}>
{t("ctas.retry")}
</Button>
</div>
)}

{/* close CTA */}
{dismissible && (
<Button size="small" onClick={() => setOpen(false)} variant="outlined">
<Button size="small" onClick={() => setOpen(false)}>
{t("ctas.dismissCta")}
</Button>
)}
Expand Down
3 changes: 0 additions & 3 deletions site/src/components/CreateUserForm/CreateUserForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,13 @@ export const CreateUserForm: FC<
autoFocus
fullWidth
label={Language.usernameLabel}
variant="outlined"
/>
<TextField
{...getFieldHelpers("email")}
onChange={onChangeTrimmed(form)}
autoComplete="email"
fullWidth
label={Language.emailLabel}
variant="outlined"
/>
<TextField
{...getFieldHelpers("password")}
Expand All @@ -87,7 +85,6 @@ export const CreateUserForm: FC<
id="password"
label={Language.passwordLabel}
type="password"
variant="outlined"
/>
</Stack>
<FormFooter onCancel={onCancel} isLoading={isLoading} />
Expand Down
1 change: 0 additions & 1 deletion site/src/components/DeploySettingsLayout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const Header: FC<{
component="a"
href={docsHref}
target="_blank"
variant="outlined"
>
Read the docs
</Button>
Expand Down
7 changes: 1 addition & 6 deletions site/src/components/Dialogs/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ export const DialogActionButtons: React.FC<DialogActionButtonsProps> = ({
return (
<>
{onCancel && (
<LoadingButton
disabled={confirmLoading}
onClick={onCancel}
variant="outlined"
fullWidth
>
<LoadingButton disabled={confirmLoading} onClick={onCancel} fullWidth>
{cancelText}
</LoadingButton>
)}
Expand Down
1 change: 0 additions & 1 deletion site/src/components/FormFooter/FormFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const FormFooter: FC<FormFooterProps> = ({
type="button"
className={styles.button}
onClick={onCancel}
variant="outlined"
tabIndex={0}
>
{Language.cancelLabel}
Expand Down
4 changes: 2 additions & 2 deletions site/src/components/FullPageForm/FullPageForm.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const Template: Story<FullPageFormProps> = (args) => (
}}
>
<Stack>
<TextField fullWidth variant="outlined" label="Field 1" name="field1" />
<TextField fullWidth variant="outlined" label="Field 2" name="field2" />
<TextField fullWidth label="Field 1" name="field1" />
<TextField fullWidth label="Field 2" name="field2" />
<FormFooter isLoading={false} onCancel={action("cancel")} />
</Stack>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const FullPageHorizontalForm: FC<
<PageHeader
actions={
onCancel && (
<Button variant="outlined" size="small" onClick={onCancel}>
<Button size="small" onClick={onCancel}>
Cancel
</Button>
)
Expand Down
2 changes: 0 additions & 2 deletions site/src/components/IconField/IconField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const IconField: FC<IconFieldProps> = ({ onPickEmoji, ...textFieldProps }) => {
{...textFieldProps}
fullWidth
label={t("iconLabel")}
variant="outlined"
InputProps={{
endAdornment: hasIcon ? (
<InputAdornment position="end" className={styles.adornment}>
Expand All @@ -51,7 +50,6 @@ const IconField: FC<IconFieldProps> = ({ onPickEmoji, ...textFieldProps }) => {
<Button
fullWidth
ref={emojiButtonRef}
variant="outlined"
size="small"
endIcon={<OpenDropdown />}
onClick={() => {
Expand Down
1 change: 0 additions & 1 deletion site/src/components/PaginationWidget/PageButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const PageButton = ({
const styles = useStyles()
return (
<Button
variant="outlined"
className={
activePage === page
? `${styles.pageButton} ${styles.activePageButton}`
Expand Down
2 changes: 0 additions & 2 deletions site/src/components/PaginationWidget/PaginationWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export const PaginationWidget = ({
<Maybe condition={showWidget}>
<div style={containerStyle} className={styles.defaultContainerStyles}>
<Button
variant="outlined"
className={styles.prevLabelStyles}
aria-label="Previous page"
disabled={firstPageActive}
Expand Down Expand Up @@ -83,7 +82,6 @@ export const PaginationWidget = ({
</Cond>
</ChooseOne>
<Button
variant="outlined"
aria-label="Next page"
disabled={lastPageActive}
onClick={() => send({ type: "NEXT_PAGE" })}
Expand Down
1 change: 0 additions & 1 deletion site/src/components/Resources/AgentButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const SecondaryAgentButton = forwardRef<HTMLButtonElement, ButtonProps>(
return (
<Button
ref={ref}
variant="outlined"
className={combineClasses([styles.secondaryButton, className])}
{...props}
/>
Expand Down
3 changes: 2 additions & 1 deletion site/src/components/Resources/ResourceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const useStyles = makeStyles((theme) => ({
},

metadata: {
fontSize: 16,
...theme.typography.body2,
},

metadataLabel: {
Expand All @@ -164,5 +164,6 @@ const useStyles = makeStyles((theme) => ({
textOverflow: "ellipsis",
overflow: "hidden",
whiteSpace: "nowrap",
...theme.typography.body1,
},
}))
1 change: 0 additions & 1 deletion site/src/components/Resources/Resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export const Resources: FC<React.PropsWithChildren<ResourcesProps>> = ({
<div className={styles.buttonWrapper}>
<Button
className={styles.showMoreButton}
variant="outlined"
size="small"
onClick={() => setShouldDisplayHideResources((v) => !v)}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const RuntimeErrorState: FC<RuntimeErrorStateProps> = ({ error }) => {
>
Reload page
</Button>
<Button component="a" href="/" variant="outlined">
<Button component="a" href="/">
Go to dashboard
</Button>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export const SearchBarWithFilter: React.FC<
<Stack direction="row" spacing={0}>
{presetFilters && presetFilters.length > 0 && (
<Button
variant="outlined"
aria-controls="filter-menu"
aria-haspopup="true"
onClick={handleClick}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export const AccountForm: FC<React.PropsWithChildren<AccountFormProps>> = ({
fullWidth
label={Language.emailLabel}
value={email}
variant="outlined"
/>
<TextField
{...getFieldHelpers("username")}
Expand All @@ -79,7 +78,6 @@ export const AccountForm: FC<React.PropsWithChildren<AccountFormProps>> = ({
disabled={!editable}
fullWidth
label={Language.usernameLabel}
variant="outlined"
/>

<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export const SecurityForm: FC<SecurityFormProps> = ({
autoComplete="old_password"
fullWidth
label={Language.oldPasswordLabel}
variant="outlined"
type="password"
/>
<TextField
Expand All @@ -94,7 +93,6 @@ export const SecurityForm: FC<SecurityFormProps> = ({
autoComplete="password"
fullWidth
label={Language.newPasswordLabel}
variant="outlined"
type="password"
/>
<TextField
Expand All @@ -105,7 +103,6 @@ export const SecurityForm: FC<SecurityFormProps> = ({
autoComplete="confirm_password"
fullWidth
label={Language.confirmPasswordLabel}
variant="outlined"
type="password"
/>

Expand Down
2 changes: 0 additions & 2 deletions site/src/components/SignInForm/OAuthSignInForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const OAuthSignInForm: FC<OAuthSignInFormProps> = ({
disabled={isSigningIn}
fullWidth
type="submit"
variant="outlined"
size="large"
>
{Language.githubSignIn}
Expand Down Expand Up @@ -73,7 +72,6 @@ export const OAuthSignInForm: FC<OAuthSignInFormProps> = ({
disabled={isSigningIn}
fullWidth
type="submit"
variant="outlined"
>
{authMethods.oidc.signInText || Language.oidcSignIn}
</Button>
Expand Down
3 changes: 0 additions & 3 deletions site/src/components/SignInForm/PasswordSignInForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export const PasswordSignInForm: FC<PasswordSignInFormProps> = ({
fullWidth
label={Language.emailLabel}
type="email"
variant="outlined"
/>
<TextField
{...getFieldHelpers("password")}
Expand All @@ -59,15 +58,13 @@ export const PasswordSignInForm: FC<PasswordSignInFormProps> = ({
id="password"
label={Language.passwordLabel}
type="password"
variant="outlined"
/>
<div>
<LoadingButton
size="large"
loading={isSigningIn}
fullWidth
type="submit"
variant="outlined"
>
{isSigningIn ? "" : Language.passwordSignIn}
</LoadingButton>
Expand Down
1 change: 0 additions & 1 deletion site/src/components/SignInForm/SignInForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ export const SignInForm: FC<React.PropsWithChildren<SignInFormProps>> = ({
fullWidth
size="large"
onClick={() => setShowPasswordAuth(true)}
variant="outlined"
startIcon={<EmailIcon className={styles.icon} />}
>
{loginPageTranslation.t("showPassword")}
Expand Down
22 changes: 3 additions & 19 deletions site/src/components/Stack/Stack.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,9 @@ export default {

const Template: Story<StackProps> = (args: StackProps) => (
<Stack {...args}>
<TextField
autoFocus
autoComplete="name"
fullWidth
label="Name"
variant="outlined"
/>
<TextField
autoComplete="email"
fullWidth
label="Email"
variant="outlined"
/>
<TextField
autoComplete="username"
fullWidth
label="Username"
variant="outlined"
/>
<TextField autoFocus autoComplete="name" fullWidth label="Name" />
<TextField autoComplete="email" fullWidth label="Email" />
<TextField autoComplete="username" fullWidth label="Username" />
</Stack>
)

Expand Down
1 change: 0 additions & 1 deletion site/src/components/TemplateLayout/TemplatePageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const TemplateMenu: FC<{
return (
<div>
<Button
variant="outlined"
aria-controls="template-options"
aria-haspopup="true"
onClick={() => setIsMenuOpen(true)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export const TemplateVariableField: FC<TemplateVariableFieldProps> = ({
setVariableValue(event.target.value)
onChange(event.target.value)
}}
variant="outlined"
/>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,7 @@ export const MissingTemplateVariablesDialog: FC<
<Button color="primary" fullWidth type="submit" form="updateVariables">
Submit
</Button>
<Button
fullWidth
type="button"
variant="outlined"
onClick={dialogProps.onClose}
>
<Button fullWidth type="button" onClick={dialogProps.onClose}>
Cancel
</Button>
</DialogActions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ export const TemplateVersionEditor: FC<TemplateVersionEditorProps> = ({
<Button
title="Build template (Ctrl + Enter)"
size="small"
variant="outlined"
disabled={disablePreview}
onClick={() => {
triggerPreview()
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/TerminalLink/TerminalLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const TerminalLink: FC<React.PropsWithChildren<TerminalLinkProps>> = ({
)
}}
>
<SecondaryAgentButton size="small" variant="outlined">
<SecondaryAgentButton size="small">
{Language.linkText}
</SecondaryAgentButton>
</Link>
Expand Down
1 change: 0 additions & 1 deletion site/src/components/UserAutocomplete/UserAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export const UserAutocomplete: FC<UserAutocompleteProps> = ({
<TextField
{...params}
fullWidth
variant="outlined"
label={label}
placeholder="User email or username"
className={styles.textField}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ export const UserOrGroupAutocomplete: React.FC<
<TextField
{...params}
margin="none"
variant="outlined"
placeholder="Search for user or group"
InputProps={{
...params.InputProps,
Expand Down
5 changes: 1 addition & 4 deletions site/src/components/UsersLayout/UsersLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export const UsersLayout: FC = () => {
{canCreateUser &&
authMethods.context.authMethods?.password.enabled && (
<Button
variant="outlined"
onClick={() => {
navigate("/users/create")
}}
Expand All @@ -52,9 +51,7 @@ export const UsersLayout: FC = () => {
component={RouterLink}
to="/groups/create"
>
<Button variant="outlined" startIcon={<GroupAdd />}>
Create group
</Button>
<Button startIcon={<GroupAdd />}>Create group</Button>
</Link>
)}
</>
Expand Down
1 change: 0 additions & 1 deletion site/src/components/VersionsTable/VersionRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export const VersionRow: React.FC<VersionRowProps> = ({
onPromoteClick && (
<Button
size="small"
variant="outlined"
className={styles.promoteButton}
onClick={(e) => {
e.preventDefault()
Expand Down
Loading