Skip to content

Commit

Permalink
Merge pull request #471 from MannLabs/highlight_non_default
Browse files Browse the repository at this point in the history
Highlight non default
  • Loading branch information
mschwoer authored Feb 18, 2025
2 parents 0f74699 + 6be3309 commit 850821e
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 93 deletions.
11 changes: 8 additions & 3 deletions gui/src/renderer/components/ParameterInput.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import styled from '@emotion/styled'

import { useTheme } from '@mui/material/styles';
import { Box, Chip, Button, Checkbox, FormControl, MenuItem, Select, Stack, Tooltip, Typography, TextField } from '@mui/material'

const StyledCheckbox = styled(Checkbox)(({ theme }) => ({
Expand Down Expand Up @@ -48,6 +48,8 @@ const ParameterInput = ({

let input = null;

parameter.value = parameter.value === undefined ? parameter.default : parameter.value

switch (parameter.type) {
case "integer":
input = (
Expand Down Expand Up @@ -206,6 +208,7 @@ const ParameterInput = ({

// make Grid which takes 100% of the height
// The last row should grow to fill the remaining space
let default_text = parameter.type === "boolean" ? (parameter.default ? "true" : "false") : parameter.default
return (

<Stack
Expand All @@ -215,8 +218,10 @@ const ParameterInput = ({
spacing={2}
sx={{minHeight: "30px"}}
>
<Tooltip title = {`[${parameter_group_id}.${parameter.id}] ${parameter.description}`} disableInteractive>
<Typography sx={{fontWeight: 400, fontSize: "12px"}}>

<Tooltip title = {`[${parameter_group_id}.${parameter.id}] ${parameter.description} (default: ${default_text})`} disableInteractive>
<Typography sx={{fontWeight: 400, fontSize: "12px",
color: parameter.value !== parameter.default ? useTheme().palette.primary.main : 'inherit'}}>
{parameter.name}
</Typography>
</Tooltip>
Expand Down
27 changes: 14 additions & 13 deletions gui/src/renderer/components/WorkflowMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ const WorkflowMenu = ({
<ButtonBase {...bindTrigger(popupState)}>
{
popupState.isOpen ?
<ArrowRightIcon sx={{color: "rgb(75, 211, 26)"}}/>
<ArrowRightIcon sx={{color: theme.palette.primary.selected}}/>
:
<ArrowDropDownIcon sx={{color: "rgb(75, 211, 26)"}}/>
<ArrowDropDownIcon sx={{color: theme.palette.primary.selected}}/>
}
<Typography component="div" sx={{color: "rgb(75, 211, 26)", fontFamily:"Roboto Mono", fontSize:"0.8rem"}}>
<Typography component="div" sx={{color: theme.palette.primary.selected, fontFamily:"Roboto Mono", fontSize:"0.8rem"}}>
{currentWorkflow !== "" ? currentWorkflow : "Select Workflow"}
</Typography>
</ButtonBase>
Expand All @@ -57,22 +57,23 @@ const WorkflowMenu = ({
<MenuItem
key={index}
onClick={() => {onWorkflowChange(workflowName); popupState.close()}}
sx={{color: theme.palette.success.main}}
sx={{color: theme.palette.primary.main}}
>
{workflowName}
</MenuItem>
)
})}

<Divider />
<MenuItem onClick={popupState.close} sx={{fontFamily:"Roboto Mono", fontSize:"0.8rem"}} key={999} >
<ListItemIcon>
<MenuBookIcon fontSize="small" />
</ListItemIcon>
<StyledLink onClick={() => window.electronAPI.openLink("http://www.google.com")} >
Workflow Documentation
</StyledLink>
</MenuItem>
{/*TODO create workflow documentation and add link here*/}
{/*<Divider />*/}
{/*<MenuItem onClick={popupState.close} sx={{fontFamily:"Roboto Mono", fontSize:"0.8rem"}} key={999} >*/}
{/* <ListItemIcon>*/}
{/* <MenuBookIcon fontSize="small" />*/}
{/* </ListItemIcon>*/}
{/* <StyledLink onClick={() => window.electronAPI.openLink("http://www.google.com")} >*/}
{/* Workflow Documentation*/}
{/* </StyledLink>*/}
{/*</MenuItem>*/}
</Menu>
</Box>

Expand Down
2 changes: 1 addition & 1 deletion gui/src/renderer/pages/Run.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function parseConsoleOutput(input, theme) {
'30;20': 'black',
'31;20': theme.palette.mode === 'light' ? "rgb(200, 1, 0)" : 'rgb(250, 150, 136)' ,
'32;20': theme.palette.mode === 'light' ?'rgb(76 211 26)' : 'rgb(168, 219, 114)',
'33;20': theme.palette.mode === 'light' ?'rgb(253 167 0)' : 'rgb(254, 219, 119',
'33;20': theme.palette.mode === 'light' ?'rgb(253 167 0)' : 'rgb(254, 219, 119)',
'34;20': 'blue',
'35;20': 'magenta',
'36;20': 'cyan',
Expand Down
Loading

0 comments on commit 850821e

Please sign in to comment.