Skip to content

Commit 258a940

Browse files
New Vertical Tab UX refactor (#1210)
Co-authored-by: Daniel Valdivia <[email protected]>
1 parent 33f13c4 commit 258a940

File tree

31 files changed

+1359
-1255
lines changed

31 files changed

+1359
-1255
lines changed

portal-ui/src/common/BackLink.tsx

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,27 @@ import { Link } from "react-router-dom";
1919
import { Theme } from "@mui/material/styles";
2020
import createStyles from "@mui/styles/createStyles";
2121
import withStyles from "@mui/styles/withStyles";
22-
import Grid from "@mui/material/Grid";
2322
import { BackSettingsIcon } from "../icons";
2423

2524
const styles = (theme: Theme) =>
2625
createStyles({
2726
link: {
27+
display: "flex",
28+
alignItems: "center",
2829
textDecoration: "none",
29-
color: theme.palette.primary.main,
30-
fontSize: 18,
31-
fontWeight: 600,
32-
marginBottom: 10,
33-
marginTop: 10,
30+
maxWidth: "250px",
31+
padding: "2rem 2rem 0rem 2rem",
32+
color: theme.palette.primary.light,
33+
fontSize: ".8rem",
34+
"&:hover": {
35+
textDecoration: "underline",
36+
},
37+
},
38+
icon: {
39+
marginRight: ".3rem",
40+
display: "flex",
41+
alignItems: "center",
42+
justifyContent: "center",
3443
},
3544
});
3645

@@ -43,12 +52,10 @@ interface IBackLink {
4352
const BackLink = ({ to, label, classes }: IBackLink) => {
4453
return (
4554
<Link to={to} className={classes.link}>
46-
<Grid container spacing={1}>
47-
<Grid item>
48-
<BackSettingsIcon />
49-
</Grid>
50-
<Grid item>{label}</Grid>
51-
</Grid>
55+
<div className={classes.icon}>
56+
<BackSettingsIcon />
57+
</div>
58+
<div>{label}</div>
5259
</Link>
5360
);
5461
};

portal-ui/src/common/HelpBox.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ const HelpBox = ({ classes, iconComponent, title, help }: IHelpBox) => {
6161
return (
6262
<div className={classes.root}>
6363
<Grid container>
64-
<Grid xs={12} className={classes.icon}>
64+
<Grid item xs={12} className={classes.icon}>
6565
{iconComponent}
6666
{title}
6767
</Grid>
68-
<Grid xs={12} className={classes.helpText}>
68+
<Grid item xs={12} className={classes.helpText}>
6969
{help}
7070
</Grid>
7171
</Grid>

portal-ui/src/screens/Console/Account/Account.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import { ErrorResponseHandler } from "../../../common/types";
4242
import ChangePasswordModal from "./ChangePasswordModal";
4343
import SearchIcon from "../../../icons/SearchIcon";
4444
import HelpBox from "../../../common/HelpBox";
45+
import PageLayout from "../Common/Layout/PageLayout";
4546

4647
const styles = (theme: Theme) =>
4748
createStyles({
@@ -75,9 +76,6 @@ const styles = (theme: Theme) =>
7576
},
7677
},
7778
},
78-
twHeight: {
79-
minHeight: 600,
80-
},
8179
imageIcon: {
8280
height: "100%",
8381
},
@@ -234,7 +232,7 @@ const Account = ({
234232
</React.Fragment>
235233
}
236234
/>
237-
<Grid container className={classes.container}>
235+
<PageLayout>
238236
<Grid item xs={12} className={classes.actionsTray}>
239237
<TextField
240238
placeholder="Search Service Accounts"
@@ -277,7 +275,6 @@ const Account = ({
277275
idField={""}
278276
columns={[{ label: "Service Account", elementKey: "" }]}
279277
itemActions={tableActions}
280-
customPaperHeight={classes.twHeight}
281278
/>
282279
</Grid>
283280
<Grid item xs={12}>
@@ -308,7 +305,7 @@ const Account = ({
308305
}
309306
/>
310307
</Grid>
311-
</Grid>
308+
</PageLayout>
312309
</React.Fragment>
313310
);
314311
};

portal-ui/src/screens/Console/Buckets/BucketDetails/AccessDetailsPanel.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616

1717
import React, { Fragment, useEffect, useState } from "react";
1818
import { connect } from "react-redux";
19-
import { Theme } from "@mui/material/styles";
20-
import createStyles from "@mui/styles/createStyles";
21-
import withStyles from "@mui/styles/withStyles";
2219
import { Paper } from "@mui/material";
2320
import Tabs from "@mui/material/Tabs";
2421
import Tab from "@mui/material/Tab";
@@ -42,8 +39,6 @@ import {
4239
} from "../../../../types";
4340
import PanelTitle from "../../Common/PanelTitle/PanelTitle";
4441

45-
const styles = (theme: Theme) => createStyles({});
46-
4742
const mapState = (state: AppState) => ({
4843
session: state.console.session,
4944
loadingBucket: state.buckets.bucketDetails.loadingBucket,
@@ -206,4 +201,4 @@ const AccessDetails = ({
206201
);
207202
};
208203

209-
export default withStyles(styles)(connector(AccessDetails));
204+
export default connector(AccessDetails);

portal-ui/src/screens/Console/Buckets/BucketDetails/BrowserHandler.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ const BrowserHandler = ({
9999
)
100100
}
101101
/>
102-
<Grid container className={classes.container}>
103-
{fileMode ? <ObjectDetails /> : <ListObjects />}
104-
</Grid>
102+
<Grid>{fileMode ? <ObjectDetails /> : <ListObjects />}</Grid>
105103
</Fragment>
106104
);
107105
};

0 commit comments

Comments
 (0)