Skip to content

Commit bdd07d1

Browse files
committed
ATLAS-5040: [React UI] Expand Collapse icon position changes on minimizing all treeviews in sidebar
1 parent f3d302a commit bdd07d1

File tree

4 files changed

+24
-29
lines changed

4 files changed

+24
-29
lines changed

dashboard/src/components/TreeNodeIcons.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,6 @@ const TreeNodeIcons = (props: {
217217
sx={{
218218
"& .MuiPaper-root": {
219219
transition: "none !important"
220-
},
221-
"& .MuiList-padding": {
222-
paddingBottom: "0 !important",
223-
paddingTop: "0 !important"
224220
}
225221
}}
226222
>
@@ -251,8 +247,8 @@ const TreeNodeIcons = (props: {
251247
setCategoryModal(true);
252248
}
253249
}}
250+
className="sidebar-menu-item"
254251
data-cy="createClassification"
255-
sx={{ paddingRight: "10px", paddingLeft: "10px" }}
256252
>
257253
<ListItemIcon sx={{ minWidth: "28px !important" }}>
258254
<AddIcon fontSize="small" className="menuitem-icon" />
@@ -309,7 +305,7 @@ const TreeNodeIcons = (props: {
309305
}
310306
}}
311307
data-cy="createClassification"
312-
sx={{ paddingRight: "10px", paddingLeft: "10px" }}
308+
className="sidebar-menu-item"
313309
>
314310
<ListItemIcon sx={{ minWidth: "28px !important" }}>
315311
<ListAltOutlinedIcon fontSize="small" className="menuitem-icon" />
@@ -346,7 +342,7 @@ const TreeNodeIcons = (props: {
346342
}
347343
}}
348344
data-cy="createClassification"
349-
sx={{ paddingRight: "10px", paddingLeft: "10px" }}
345+
className="sidebar-menu-item"
350346
>
351347
<ListItemIcon sx={{ minWidth: "28px !important" }}>
352348
<DeleteOutlineOutlinedIcon
@@ -389,7 +385,7 @@ const TreeNodeIcons = (props: {
389385
});
390386
}}
391387
data-cy="createClassification"
392-
sx={{ paddingRight: "10px", paddingLeft: "10px" }}
388+
className="sidebar-menu-item"
393389
>
394390
<ListItemIcon sx={{ minWidth: "24px !important" }}>
395391
<SearchOutlinedIcon fontSize="small" className="menuitem-icon" />
@@ -413,7 +409,7 @@ const TreeNodeIcons = (props: {
413409
setCategoryModal(true);
414410
}}
415411
data-cy="createClassification"
416-
sx={{ paddingRight: "10px", paddingLeft: "10px" }}
412+
className="sidebar-menu-item"
417413
>
418414
<ListItemIcon sx={{ minWidth: "24px !important" }}>
419415
<ListAltIcon fontSize="small" className="menuitem-icon" />
@@ -433,6 +429,7 @@ const TreeNodeIcons = (props: {
433429
setRenameModal(true);
434430
}}
435431
data-cy="createClassification"
432+
className="sidebar-menu-item"
436433
>
437434
<ListItemIcon>
438435
<EditOutlinedIcon fontSize="small" className="menuitem-icon" />
@@ -448,6 +445,7 @@ const TreeNodeIcons = (props: {
448445
setDeleteModal(true);
449446
}}
450447
data-cy="downloadBusinessMetadata"
448+
className="sidebar-menu-item"
451449
>
452450
<ListItemIcon>
453451
<DeleteOutlineOutlinedIcon

dashboard/src/styles/sidebar.scss

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686

8787
.menuitem-icon {
8888
color: v.$text-green;
89+
margin-bottom: 2px;
8990
}
9091
.menuitem-label {
9192
color: v.$text-grey;
@@ -157,8 +158,8 @@
157158
text-overflow: ellipsis;
158159
overflow: hidden;
159160
font-size: 14px;
160-
line-height: 26px;
161-
height: 26px;
161+
line-height: 29px;
162+
height: 29px;
162163
}
163164

164165
.sidebar-wrapper {
@@ -209,15 +210,6 @@
209210
padding-bottom: 1.5rem;
210211
}
211212

212-
// .custom-treeitem-label.selected .Mui-selected .MuiTreeItem-contentBar {
213-
// background-color: rgba(255, 255, 255, 0.08);
214-
// border-left: 4px solid #2ccebb;
215-
// }
216-
217-
// .custom-treeitem-label .Mui-selected .MuiTreeItem-contentBar {
218-
// background-color: rgba(255, 255, 255, 0.08);
219-
// border-left: 4px solid #2ccebb;
220-
221213
button.MuiButtonBase-root.MuiIconButton-root.MuiIconButton-sizeSmall.tree-item-more-label {
222214
font-size: 1.25rem !important;
223215
}
@@ -227,3 +219,7 @@ button.MuiButtonBase-root.MuiIconButton-root.MuiIconButton-sizeSmall.tree-item-m
227219
font-size: 1.25rem !important;
228220
color: white !important;
229221
}
222+
223+
.sidebar-menu-item {
224+
padding: 4px 10px !important;
225+
}

dashboard/src/views/SideBar/SideBarBody.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,13 @@ const SideBarBody = (props: {
370370
</div>
371371
<div
372372
style={{
373-
width: "100%",
373+
width: "inherit",
374374
textAlign: "right",
375-
padding: "4px 0",
376-
position: "sticky",
375+
padding: "8px",
376+
position: "fixed",
377377
bottom: "0px",
378-
marginTop: "64px",
378+
zIndex: "9",
379+
left: "0",
379380
background: "#034858"
380381
}}
381382
>

dashboard/src/views/SideBar/SideBarTree/SideBarTree.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const CustomContentRoot = styled("div")<CustomContentRootProps>(
9494
".MuiTreeItem-contentBar": {
9595
position: "absolute",
9696
width: "100%",
97-
height: 24,
97+
height: 29,
9898
left: 0
9999
},
100100
".MuiTreeItem-iconContainer": {
@@ -1019,7 +1019,7 @@ const BarTreeView: FC<{
10191019
}
10201020
}}
10211021
data-cy="groupOrFlatTreeView"
1022-
sx={{ padding: "4px 10px" }}
1022+
className="sidebar-menu-item"
10231023
>
10241024
<ListItemIcon
10251025
sx={{ minWidth: "28px !important" }}
@@ -1054,7 +1054,7 @@ const BarTreeView: FC<{
10541054
}
10551055
}}
10561056
data-cy="createClassification"
1057-
sx={{ padding: "4px 10px" }}
1057+
className="sidebar-menu-item"
10581058
>
10591059
<ListItemIcon
10601060
sx={{ minWidth: "28px !important" }}
@@ -1082,7 +1082,7 @@ const BarTreeView: FC<{
10821082
? true
10831083
: false
10841084
}
1085-
sx={{ padding: "4px 10px" }}
1085+
className="sidebar-menu-item"
10861086
>
10871087
<ListItemIcon sx={{ minWidth: "28px !important" }}>
10881088
<FileDownloadIcon
@@ -1107,7 +1107,7 @@ const BarTreeView: FC<{
11071107
? true
11081108
: false
11091109
}
1110-
sx={{ padding: "4px 10px" }}
1110+
className="sidebar-menu-item"
11111111
>
11121112
<ListItemIcon sx={{ minWidth: "28px !important" }}>
11131113
<FileUploadIcon

0 commit comments

Comments
 (0)