From: Stephen Smith Date: Tue, 14 May 2024 15:17:25 +0000 (-0400) Subject: 21225: Fix capped maxWidth preventing full width with negative margins on MPV X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/10e1abd9cfb8f5cc11659c7961b9d83cf5b9a8b8?ds=sidebyside 21225: Fix capped maxWidth preventing full width with negative margins on MPV Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- diff --git a/services/workbench2/src/components/multi-panel-view/multi-panel-view.tsx b/services/workbench2/src/components/multi-panel-view/multi-panel-view.tsx index 72903d7ef5..69e2b7015e 100644 --- a/services/workbench2/src/components/multi-panel-view/multi-panel-view.tsx +++ b/services/workbench2/src/components/multi-panel-view/multi-panel-view.tsx @@ -38,6 +38,7 @@ const styles: StyleRulesCallback = theme => ({ }, content: { overflow: 'auto', + maxWidth: 'initial', }, tabsWrapper: { width: '100%', diff --git a/services/workbench2/src/views/collection-panel/collection-panel.tsx b/services/workbench2/src/views/collection-panel/collection-panel.tsx index 2de273c447..5f15ba8fcd 100644 --- a/services/workbench2/src/views/collection-panel/collection-panel.tsx +++ b/services/workbench2/src/views/collection-panel/collection-panel.tsx @@ -39,7 +39,7 @@ import { MPVContainer, MPVPanelContent, MPVPanelState } from 'components/multi-p import { resourceIsFrozen } from 'common/frozen-resources'; import { NotFoundView } from 'views/not-found-panel/not-found-panel'; -type CssRules = 'root' +type CssRules = | 'button' | 'infoCard' | 'propertiesCard' @@ -59,9 +59,6 @@ type CssRules = 'root' | 'content'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ - root: { - width: '100%', - }, button: { cursor: 'pointer' }, @@ -171,7 +168,7 @@ export const CollectionPanel = withStyles(styles)(connect( { name: "Files" }, ]; return item - ? + ? = (theme: ArvadosTheme) => ({ - root: { - width: "100%", - }, -}); - export interface ProcessPanelRootDataProps { process?: Process; subprocesses: Array; @@ -65,7 +57,7 @@ export interface ProcessPanelRootActionProps { pollProcessLogs: (processUuid: string) => Promise; } -export type ProcessPanelRootProps = ProcessPanelRootDataProps & ProcessPanelRootActionProps & WithStyles; +export type ProcessPanelRootProps = ProcessPanelRootDataProps & ProcessPanelRootActionProps; const panelsData: MPVPanelState[] = [ { name: "Details" }, @@ -77,149 +69,146 @@ const panelsData: MPVPanelState[] = [ { name: "Resources" }, ]; -export const ProcessPanelRoot = withStyles(styles)( - ({ - process, - auth, - processLogsPanel, - inputRaw, - inputParams, - outputData, - outputDefinitions, - outputParams, - nodeInfo, - usageReport, - loadInputs, - loadOutputs, - loadNodeJson, - loadOutputDefinitions, - updateOutputParams, - ...props - }: ProcessPanelRootProps) => { - const outputUuid = process?.containerRequest.outputUuid; - const containerRequest = process?.containerRequest; - const inputMounts = getInputCollectionMounts(process?.containerRequest); +export const ProcessPanelRoot = ({ + process, + auth, + processLogsPanel, + inputRaw, + inputParams, + outputData, + outputDefinitions, + outputParams, + nodeInfo, + usageReport, + loadInputs, + loadOutputs, + loadNodeJson, + loadOutputDefinitions, + updateOutputParams, + ...props +}: ProcessPanelRootProps) => { + const outputUuid = process?.containerRequest.outputUuid; + const containerRequest = process?.containerRequest; + const inputMounts = getInputCollectionMounts(process?.containerRequest); - React.useEffect(() => { - if (containerRequest) { - // Load inputs from mounts or props - loadInputs(containerRequest); - // Fetch raw output (loads from props or keep) - loadOutputs(containerRequest); - // Loads output definitions from mounts into store - loadOutputDefinitions(containerRequest); - // load the assigned instance type from node.json in - // the log collection - loadNodeJson(containerRequest); - } - }, [containerRequest, loadInputs, loadOutputs, loadOutputDefinitions, loadNodeJson]); + React.useEffect(() => { + if (containerRequest) { + // Load inputs from mounts or props + loadInputs(containerRequest); + // Fetch raw output (loads from props or keep) + loadOutputs(containerRequest); + // Loads output definitions from mounts into store + loadOutputDefinitions(containerRequest); + // load the assigned instance type from node.json in + // the log collection + loadNodeJson(containerRequest); + } + }, [containerRequest, loadInputs, loadOutputs, loadOutputDefinitions, loadNodeJson]); - const maxHeight = "100%"; + const maxHeight = "100%"; - // Trigger processing output params when raw or definitions change - React.useEffect(() => { - updateOutputParams(); - }, [outputData, outputDefinitions, updateOutputParams]); + // Trigger processing output params when raw or definitions change + React.useEffect(() => { + updateOutputParams(); + }, [outputData, outputDefinitions, updateOutputParams]); - return process ? ( - - - props.onContextMenu(event, process)} - cancelProcess={props.cancelProcess} - startProcess={props.startProcess} - resumeOnHoldWorkflow={props.resumeOnHoldWorkflow} - /> - - - ({ label: filter, value: filter }))} - onLogFilterChange={props.onLogFilterChange} - navigateToLog={props.navigateToLog} - pollProcessLogs={props.pollProcessLogs} - /> - - - - - - - - - - - - - - - - - - ) : ( - - ); - } -); + return process ? ( + + + props.onContextMenu(event, process)} + cancelProcess={props.cancelProcess} + startProcess={props.startProcess} + resumeOnHoldWorkflow={props.resumeOnHoldWorkflow} + /> + + + ({ label: filter, value: filter }))} + onLogFilterChange={props.onLogFilterChange} + navigateToLog={props.navigateToLog} + pollProcessLogs={props.pollProcessLogs} + /> + + + + + + + + + + + + + + + + + + ) : ( + + ); +}; diff --git a/services/workbench2/src/views/workflow-panel/registered-workflow-panel.tsx b/services/workbench2/src/views/workflow-panel/registered-workflow-panel.tsx index aa4c1b29d4..d85bef8dac 100644 --- a/services/workbench2/src/views/workflow-panel/registered-workflow-panel.tsx +++ b/services/workbench2/src/views/workflow-panel/registered-workflow-panel.tsx @@ -29,7 +29,7 @@ import { ProcessIOCard, ProcessIOCardType } from 'views/process-panel/process-io import { NotFoundView } from 'views/not-found-panel/not-found-panel'; import { WorkflowProcessesPanel } from './workflow-processes-panel'; -type CssRules = 'root' +type CssRules = | 'button' | 'infoCard' | 'propertiesCard' @@ -49,9 +49,6 @@ type CssRules = 'root' | 'content'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ - root: { - width: '100%', - }, button: { cursor: 'pointer' }, @@ -142,7 +139,7 @@ export const RegisteredWorkflowPanel = withStyles(styles)(connect( { name: "Definition" }, ]; return item - ? + ?