Skip to content

Commit

Permalink
Merge pull request #489 from ImanMahmoudinasab/feat/migrate-landing-p…
Browse files Browse the repository at this point in the history
…age-to-mui

feat: migrate landing page to MUI
  • Loading branch information
agoldis committed Nov 14, 2021
2 parents 39d90d2 + 99fc097 commit c1639a2
Show file tree
Hide file tree
Showing 62 changed files with 1,129 additions and 1,121 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ credentials
# Minio
/data
example/data

# OS files
.DS_Store
4 changes: 3 additions & 1 deletion packages/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
"@apollo/client": "^3.3.11",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@fontsource/roboto": "^4.5.1",
"@mui/icons-material": "^5.0.5",
"@mui/lab": "5.0.0-alpha.53",
"@mui/material": "^5.0.6",
"@mui/styles": "^5.0.2",
"@mui/x-data-grid": "^5.0.0-beta.6",
"@popperjs/core": "^2.4.0",
"@sorry-cypress/common": "1.0.0",
"bold-ui": "^1.0.0-beta.40",
"date-fns": "^2.21.3",
"dotenv": "^8.2.0",
"ejs": "^2.7.1",
Expand Down Expand Up @@ -90,7 +90,9 @@
"npm-run-all": "^4.1.5",
"prettier": "^2.1.2",
"style-loader": "^1.0.0",
"svg-url-loader": "^7.1.1",
"typescript": "^4.1.5",
"url-loader": "^4.1.1",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.3",
"webpack-dev-middleware": "^3.7.2",
Expand Down
Binary file added packages/dashboard/server/static/Logo Archive.zip
Binary file not shown.
Binary file modified packages/dashboard/server/static/android-chrome-192x192.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/dashboard/server/static/apple-touch-icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/dashboard/server/static/favicon-16x16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/dashboard/server/static/favicon-32x32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/dashboard/server/static/favicon.ico
Binary file not shown.
75 changes: 0 additions & 75 deletions packages/dashboard/server/static/fonts.css

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified packages/dashboard/server/static/mstile-150x150.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions packages/dashboard/server/static/normalize.min.css

This file was deleted.

77 changes: 25 additions & 52 deletions packages/dashboard/server/static/safari-pinned-tab.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 2 additions & 9 deletions packages/dashboard/src/components/common/textFieldLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,8 @@ export const InputFieldLabel = (
</Tooltip>
);
return (
<FormControl
fullWidth
required={required}
style={{ marginBottom: '1.5rem' }}
>
<FormLabel
htmlFor={htmlFor}
sx={{ display: 'flex', marginBottom: '0.5rem' }}
>
<FormControl fullWidth required={required} sx={{ mb: 1.5 }}>
<FormLabel htmlFor={htmlFor} sx={{ display: 'flex', marginBottom: 0.5 }}>
{Help}
<span>{label}</span>
</FormLabel>
Expand Down
28 changes: 0 additions & 28 deletions packages/dashboard/src/components/layout/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@ import {
} from '@mui/icons-material';
import {
Breadcrumbs,
FormControlLabel,
FormGroup,
IconButton,
Link,
styled,
Switch,
Toolbar,
Tooltip,
} from '@mui/material';
import MuiAppBar, { AppBarProps as MuiAppBarProps } from '@mui/material/AppBar';
import { useAutoRefresh } from '@sorry-cypress/dashboard/hooks';
import {
NavItemType,
navStructure,
Expand Down Expand Up @@ -75,7 +71,6 @@ export const Header: HeaderComponent = ({ open, onMenuClick }) => {
const lastNavItem = nav.length > 1 ? last(nav) : nav?.[0];
const LastItemIcon =
lastNavItem && !isNil(lastNavItem.type) && ICONS[lastNavItem.type];
const [shouldAutoRefresh, setShouldAutoRefresh] = useAutoRefresh();

return (
<AppBar position="fixed" open={open}>
Expand Down Expand Up @@ -169,29 +164,6 @@ export const Header: HeaderComponent = ({ open, onMenuClick }) => {
</Tooltip>
)}
</Breadcrumbs>
<FormGroup>
<Tooltip
title="Toggle polling for updates
"
>
<FormControlLabel
control={
<Switch
checked={!!shouldAutoRefresh}
onChange={() => {
setShouldAutoRefresh(!shouldAutoRefresh);
window.location.reload();
}}
inputProps={{ 'aria-label': 'Auto Refresh' }}
/>
}
sx={{
color: 'text.primary',
}}
label="Auto Refresh"
/>
</Tooltip>
</FormGroup>
</Toolbar>
</AppBar>
);
Expand Down
11 changes: 3 additions & 8 deletions packages/dashboard/src/components/layout/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Box, Container, Toolbar, useMediaQuery } from '@mui/material';
import { useTheme } from '@mui/material/styles';
import { useLocalStorage } from '@sorry-cypress/dashboard/hooks';
import { WithMaterial } from '@sorry-cypress/dashboard/lib/material';
import React, { PropsWithChildren } from 'react';
import { Header } from './header';
import { Sidebar } from './sidebar';
Expand All @@ -23,10 +22,8 @@ export const Layout = ({ children }: PropsWithChildren<any>) => {
<Box
sx={{ display: 'flex', minHeight: '100vh', backgroundColor: '#E8E8EC' }}
>
<WithMaterial>
<Sidebar open={open} onToggleSidebar={toggleSidebar} />
<Header open={open} onMenuClick={toggleSidebar} />
</WithMaterial>
<Sidebar open={open} onToggleSidebar={toggleSidebar} />
<Header open={open} onMenuClick={toggleSidebar} />
<Container
maxWidth="xl"
component="main"
Expand All @@ -37,9 +34,7 @@ export const Layout = ({ children }: PropsWithChildren<any>) => {
width: 'auto',
}}
>
<WithMaterial>
<Toolbar />
</WithMaterial>
<Toolbar />
{children}
</Container>
</Box>
Expand Down
6 changes: 3 additions & 3 deletions packages/dashboard/src/components/layout/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import {
NavItemType,
navStructure,
} from '@sorry-cypress/dashboard/lib/navigation';
import logoDark from '@sorry-cypress/dashboard/resources/logo-dark.svg';
import React from 'react';
import { Link as RouterLink } from 'react-router-dom';
import { version } from '../../../package.json';
Expand All @@ -67,7 +68,6 @@ const sidebarTheme = createTheme({
typography: {
fontWeightBold: 700,
fontWeightMedium: 500,
fontFamily: 'IBM Plex Sans',
fontWeightRegular: 400,
},
});
Expand Down Expand Up @@ -338,14 +338,14 @@ export const Sidebar: SidebarType = ({ open, onToggleSidebar }) => {
component="div"
sx={{
justifyContent: 'center',
maxWidth: 300,
maxWidth: 275,
}}
>
<ListItemAvatar sx={{ minWidth: '42px' }}>
<RouterLink to="/">
<Avatar
alt="Sorry Cypress Dashboard Home"
src={`https://gblobscdn.gitbook.com/spaces%2F-MS6gDAYECuzpKjjzrdc%2Favatar-1611996755562.png?alt=media`}
src={logoDark}
variant="square"
sx={{
transition: 'all 0.3s',
Expand Down
17 changes: 0 additions & 17 deletions packages/dashboard/src/components/ui/centered.tsx

This file was deleted.

31 changes: 0 additions & 31 deletions packages/dashboard/src/components/ui/flexRow.tsx

This file was deleted.

0 comments on commit c1639a2

Please sign in to comment.