From 8ab32ca61d885567bafeae8d3e7211976dbd2629 Mon Sep 17 00:00:00 2001 From: Aiga115 Date: Mon, 18 Dec 2023 16:38:09 +0100 Subject: [PATCH] #737 UI fix --- .../drawer/WorkspaceInteractions.tsx | 53 +++++++++++-------- .../drawer/WorkspaceResourceBrowser.tsx | 18 ++++--- .../osb-portal/src/pages/WorkspacePage.tsx | 6 +-- 3 files changed, 47 insertions(+), 30 deletions(-) diff --git a/applications/osb-portal/src/components/workspace/drawer/WorkspaceInteractions.tsx b/applications/osb-portal/src/components/workspace/drawer/WorkspaceInteractions.tsx index 4c1d4ee7..e32bcdfe 100644 --- a/applications/osb-portal/src/components/workspace/drawer/WorkspaceInteractions.tsx +++ b/applications/osb-portal/src/components/workspace/drawer/WorkspaceInteractions.tsx @@ -116,7 +116,7 @@ interface WorkspaceProps { } const SidebarBox = styled(Box)(({ theme }) => ({ - borderRight: `0.085rem solid ${borderColor}`, + // borderRight: `0.085rem solid ${borderColor}`, width: "100%", })); @@ -132,7 +132,7 @@ function TabPanel(props) { {...other} > {value === index && ( - {children} + {children} )} ); @@ -142,6 +142,9 @@ const SidebarIconButton = styled(IconButton)(({ theme }) => ({ padding: 0, "& .MuiSvgIcon-root": { color: paragraph, + width: '1rem', + height: '1rem', + marginLeft: '0.25rem' }, "&:hover": { background: "none", @@ -198,31 +201,37 @@ export default (props: WorkspaceProps | any) => { <> {props.open ? ( - - {!hideTabs && ( + {!hideTabs && ( + - - - - )} + value={tabValue} + onChange={handleTabChange} + variant="fullWidth" + > + + + + )} - + { variant: "body2", }} /> - + { ) : ( - + + + )} diff --git a/applications/osb-portal/src/components/workspace/drawer/WorkspaceResourceBrowser.tsx b/applications/osb-portal/src/components/workspace/drawer/WorkspaceResourceBrowser.tsx index d703d6b8..20e84717 100644 --- a/applications/osb-portal/src/components/workspace/drawer/WorkspaceResourceBrowser.tsx +++ b/applications/osb-portal/src/components/workspace/drawer/WorkspaceResourceBrowser.tsx @@ -38,6 +38,7 @@ import { bgInputs, } from "../../../theme"; import { ResourceType } from "../../../apiclient/workspaces"; +import { Typography } from "@mui/material"; @@ -45,6 +46,8 @@ const SidebarIconButton = styled(IconButton)(({ theme }) => ({ padding: 0, "& .MuiSvgIcon-root": { color: paragraph, + width: '1rem', + height: '1rem' }, "&:hover": { background: "none", @@ -57,9 +60,7 @@ const ResourceItem = styled(ListItem)(({ theme }) => ({ color: lightWhite, }, "& .MuiListItemButton-root": { - paddingLeft: "2.571rem", - paddingTop: 0, - paddingBottom: 0, + padding: '0.25rem 1rem 0.25rem 2.25rem', "&:hover": { background: workspaceItemBg, }, @@ -85,6 +86,10 @@ const ResourceItem = styled(ListItem)(({ theme }) => ({ "& .active .MuiTypography-root": { color: orangeText, }, + "& .MuiListItemText-root": { + margin: 0, + maxWidth: '10rem' + } })); const OSBResourceItem = (props: { @@ -218,7 +223,7 @@ const WorkspaceResourceBrowser = (props: WorkspaceProps) => { return ( <> - setOpen(!open)}> + setOpen(!open)}> {open ? ( @@ -234,8 +239,9 @@ const WorkspaceResourceBrowser = (props: WorkspaceProps) => { pl: "0.286rem", }} /> + {resources.length} - + {open && resources.map((resource) => ( { return ( - + {experimentalResources.length > 0 && ( { item xs={12} sm={3} - lg={2} + lg={2.5} sx={{ borderRight: `1px solid ${bgLightest}`, }} @@ -251,7 +251,7 @@ export const WorkspacePage = (props: any) => { justifyContent={workspace?.thumbnail ? "center" : "start"} xs={12} sm={6} - lg={8} + lg={6.5} id="workspace-detail-content" className="verticalFit" > @@ -298,7 +298,7 @@ export const WorkspacePage = (props: any) => { - +