Skip to content

Commit 49d5d47

Browse files
committed
first round of feedback from imaginer
1 parent 464baa6 commit 49d5d47

File tree

5 files changed

+89
-10
lines changed

5 files changed

+89
-10
lines changed

admin/src/admin.js

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,25 @@ const CustomNotification = props => {
7272
let itaSchemas;
7373

7474
const theme = createTheme({
75-
overrides: {
75+
components: {
7676
MuiDrawer: {
77-
docked: {
78-
background: "#222222",
79-
minHeight: "100vh"
77+
styleOverrides: {
78+
paper: {
79+
backgroundColor: "#222222",
80+
minHeight: "100vh",
81+
position: "sticky",
82+
top: 0,
83+
overflowX: "hidden"
84+
}
85+
}
86+
},
87+
MuiAppBar: {
88+
styleOverrides: {
89+
root: {
90+
position: "sticky",
91+
top: 0,
92+
zIndex: 1100
93+
}
8094
}
8195
}
8296
},
@@ -252,10 +266,15 @@ const HiddenAppBar = withStyles({
252266
"@media (min-width: 768px) and (min-height: 480px)": {
253267
display: "none"
254268
}
269+
},
270+
root: {
271+
position: "sticky",
272+
top: 0,
273+
zIndex: 1100
255274
}
256275
})(props => {
257276
const { classes, ...other } = props;
258-
return <AppBar {...other} className={classes.hideOnDesktop} />;
277+
return <AppBar {...other} className={`${classes.hideOnDesktop} ${classes.root}`} />;
259278
});
260279

261280
document.addEventListener("DOMContentLoaded", async () => {

admin/src/react-components/admin-menu.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,21 @@ const styles = () => ({
2929
root: {
3030
width: "100%",
3131
paddingTop: 0,
32+
backgroundColor: "#222222",
33+
minHeight: "100vh",
34+
position: "sticky",
35+
top: 0,
3236

3337
"& .active": {
34-
background: "#1700c7!important"
38+
backgroundColor: "#1700c7 !important"
3539
},
3640

3741
"& .active div span": {
38-
color: "#ffffff!important"
42+
color: "#ffffff !important"
3943
},
4044

4145
"& .active svg": {
42-
color: "#FFFFFF"
46+
color: "#FFFFFF !important"
4347
},
4448

4549
active: {
@@ -52,7 +56,10 @@ const styles = () => ({
5256
logo: {
5357
margin: 0,
5458
padding: 0,
55-
background: "#222222;!important",
59+
backgroundColor: "#222222 !important",
60+
position: "sticky",
61+
top: 0,
62+
zIndex: 10,
5663

5764
"& img": {
5865
padding: "0 12px 8px 12px",

admin/src/styles/globals.scss

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,37 @@ button[type="button"] {
3333
* {
3434
box-sizing: border-box;
3535
}
36+
37+
// Fix Material-UI v5 sidebar and layout issues
38+
.MuiDrawer-root {
39+
.MuiDrawer-paper {
40+
background-color: #222222 !important;
41+
min-height: 100vh !important;
42+
position: sticky !important;
43+
top: 0 !important;
44+
overflow-x: hidden !important;
45+
}
46+
}
47+
48+
// Ensure consistent layout
49+
.RaLayout-root {
50+
display: flex !important;
51+
min-height: 100vh !important;
52+
margin: 0 !important;
53+
padding: 0 !important;
54+
}
55+
56+
// Fix main content area
57+
.RaLayout-content {
58+
flex: 1 !important;
59+
padding: 0 !important;
60+
margin: 0 !important;
61+
}
62+
63+
// Override any problematic Material-UI margins/padding
64+
.MuiBox-root {
65+
&:first-child {
66+
padding-top: 0 !important;
67+
margin-top: 0 !important;
68+
}
69+
}

admin/src/styles/ui/page.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@
1010
.global_background {
1111
// need to override material
1212
background-color: $color-neutral-1 !important;
13+
padding: 0 !important;
14+
margin: 0 !important;
15+
16+
// Fix Material-UI v5 layout issues
17+
& .MuiBox-root {
18+
padding-top: 0 !important;
19+
margin-top: 0 !important;
20+
}
21+
22+
// Ensure main content area starts properly
23+
& main {
24+
padding-top: 0 !important;
25+
margin-top: 0 !important;
26+
}
1327
}
1428

1529
.card_section {

admin/src/utils/with-common-styles.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ import { blue, green, amber } from "@material-ui/core/colors";
22

33
const getCommon = theme => ({
44
container: {
5-
...theme.mixins.gutters(),
5+
paddingLeft: theme.spacing(2),
6+
paddingRight: theme.spacing(2),
7+
[theme.breakpoints.up('sm')]: {
8+
paddingLeft: theme.spacing(3),
9+
paddingRight: theme.spacing(3),
10+
},
611
...theme.typography,
712
display: "flex",
813
flexWrap: "wrap",

0 commit comments

Comments
 (0)