made some changes to the checkbox for the labels, and made sure that the tabs are scrollable in mobile view

This commit is contained in:
csawatzky 2026-06-10 16:40:50 -06:00
parent 2cffc20daa
commit 124856baac
2 changed files with 56 additions and 51 deletions

View file

@ -103,31 +103,16 @@ export default function bin3dVisualizer(props: Props){
const heatmapDisplay = () => { const heatmapDisplay = () => {
return ( return (
<Box> <Box>
<Box display="flex" alignContent="center" alignItems={"center"} justifyContent={"space-between"}> <Typography noWrap sx={{fontWeight: 650, fontSize: isMobile ? 13 : 20}}>
<Typography noWrap sx={{fontWeight: 650, fontSize: isMobile ? 13 : 20}}>Heatmap Display</Typography> Heatmap
<FormControlLabel </Typography>
labelPlacement="start"
control={
<Checkbox
checked={showLabels}
onChange={(e, checked) => {
setShowLabels(checked)
}}
/>
}
label={<Typography noWrap sx={{fontSize: 11}}>Show Values</Typography>}
/>
</Box>
<FormControl fullWidth> <FormControl fullWidth>
{/* <InputLabel>Display</InputLabel> */}
<Select <Select
value={binDisplay} value={binDisplay}
sx={{ sx={{
borderRadius: 1, borderRadius: 1,
bgcolor: 'rgba(255,255,255,0.08)', bgcolor: 'rgba(255,255,255,0.08)',
'& .MuiSelect-select': { '& .MuiSelect-select': { py: 1.5 },
py: 1.5,
},
'& .MuiOutlinedInput-notchedOutline': { border: 'none' }, '& .MuiOutlinedInput-notchedOutline': { border: 'none' },
'&:hover .MuiOutlinedInput-notchedOutline': { border: 'none' }, '&:hover .MuiOutlinedInput-notchedOutline': { border: 'none' },
'&.Mui-focused .MuiOutlinedInput-notchedOutline': { border: 'none' }, '&.Mui-focused .MuiOutlinedInput-notchedOutline': { border: 'none' },
@ -147,11 +132,24 @@ export default function bin3dVisualizer(props: Props){
setShowMoisture(true) setShowMoisture(true)
setShowMoistureHeatmap(true) setShowMoistureHeatmap(true)
} }
}}> }}
>
<MenuItem value={"temp"}>Temperature</MenuItem> <MenuItem value={"temp"}>Temperature</MenuItem>
<MenuItem value={"moisture"}>Moisture</MenuItem> <MenuItem value={"moisture"}>Moisture</MenuItem>
</Select> </Select>
</FormControl> </FormControl>
{/* Checkbox moved below dropdown — no longer affects top alignment */}
<FormControlLabel
control={
<Checkbox
size="small"
checked={showLabels}
onChange={(e, checked) => setShowLabels(checked)}
/>
}
label={<Typography noWrap sx={{fontSize: 11}}>Show Values</Typography>}
sx={{ mt: 0.5, ml: '-9px' }}
/>
</Box> </Box>
) )
} }

View file

@ -73,8 +73,15 @@ export default function BinDetails (props: Props) {
onChange={(_, value) => setCurrentTab(value)} onChange={(_, value) => setCurrentTab(value)}
indicatorColor="primary" indicatorColor="primary"
textColor="primary" textColor="primary"
variant="fullWidth" variant="scrollable"
sx={{ flexShrink: 0 }}> scrollButtons="auto"
allowScrollButtonsMobile
sx={{
flexShrink: 0,
'& .MuiTabs-scroller': {
overflowX: 'auto !important',
}
}}>
{isMobile && <Tab label={"Bin"} value={"bin"} />} {isMobile && <Tab label={"Bin"} value={"bin"} />}
<Tab label={"Table"} value={"table"} /> <Tab label={"Table"} value={"table"} />
<Tab label={"Alerts"} value={"alerts"} /> <Tab label={"Alerts"} value={"alerts"} />