diff --git a/Eplant/Eplant.tsx b/Eplant/Eplant.tsx index 1d9de465..2c810bc1 100644 --- a/Eplant/Eplant.tsx +++ b/Eplant/Eplant.tsx @@ -1,4 +1,5 @@ -import { Add, CallMade, CallReceived, Close } from '@mui/icons-material' +import useStateWithStorage from '@eplant/util/useStateWithStorage' +import { Add, OpenInNew, CallReceived, Close } from '@mui/icons-material' import { Box, CircularProgress, @@ -8,6 +9,7 @@ import { DrawerProps, IconButton, LinearProgress, + Tooltip, ThemeProvider, } from '@mui/material' import { useTheme } from '@mui/material/styles' @@ -44,7 +46,7 @@ import { dark, light } from './theme' // TODO: Make this drawer support opening/closing on mobile -const sideBarWidth = 300 +const sideBarWidth = 240 function ResponsiveDrawer(props: DrawerProps) { const [open, setOpen] = React.useState(props.open) @@ -342,6 +344,7 @@ function EplantLayout() { right: '0px', position: 'absolute', margin: theme.spacing(1), + marginRight: 0, boxSizing: 'border-box', })} > @@ -391,7 +394,7 @@ function EplantLayout() { }} size="small" > - + , ] }} @@ -463,20 +466,22 @@ function EplantLayout() { size="small" key="add-tab" > - - , + + ) renderValues.buttons.push( - { - const id = node.getSelectedNode()?.getId() - if (id) makePopout(id) - }} - size="small" - key="make-popout" - > - - , + + { + const id = node.getSelectedNode()?.getId() + if (id) makePopout(id) + }} + size="small" + key="make-popout" + > + + + ) } } diff --git a/Eplant/UI/Dropdown.tsx b/Eplant/UI/Dropdown.tsx index fcc48b7c..fc1f6394 100644 --- a/Eplant/UI/Dropdown.tsx +++ b/Eplant/UI/Dropdown.tsx @@ -83,6 +83,8 @@ export default function Dropdown({ 'aria-labelledby': buttonId, }} anchorEl={anchorEl} + anchorOrigin={{ vertical: 'bottom', horizontal: 'left' }} + transformOrigin={{ vertical: 'top', horizontal: 'left' }} open={open} onClose={handleClose} > diff --git a/Eplant/UI/GeneticElementComponent.tsx b/Eplant/UI/GeneticElementComponent.tsx index 8cd16dc3..810dd119 100644 --- a/Eplant/UI/GeneticElementComponent.tsx +++ b/Eplant/UI/GeneticElementComponent.tsx @@ -188,6 +188,7 @@ export default function GeneticElementComponent({ ? theme.palette.background.selected : theme.palette.background.default })`, + width: '100%', height: '100%', position: 'absolute', @@ -195,7 +196,7 @@ export default function GeneticElementComponent({ zIndex: 5, }, ':hover::before': { - background: `linear-gradient(to right, transparent, 95%, ${theme.palette.background.hover})`, + background: `linear-gradient(to right, transparent, 95%, ${theme.palette.background.selected})`, }, }} ref={textContainerRef} @@ -211,14 +212,21 @@ export default function GeneticElementComponent({ : '', position: 'absolute', userSelect: 'none', + top: '2px', })} ref={textGroupRef} > - + {geneticElement.id} - + {geneticElement.aliases.join(', ')} diff --git a/Eplant/UI/Layout/ViewContainer/index.tsx b/Eplant/UI/Layout/ViewContainer/index.tsx index daef2a6d..ea24599e 100644 --- a/Eplant/UI/Layout/ViewContainer/index.tsx +++ b/Eplant/UI/Layout/ViewContainer/index.tsx @@ -76,17 +76,38 @@ export function ViewContainer({ position="sticky" elevation={0} > - + {/* View selector dropdown */} - {/* View */}