From 015668c71b0d0a88fefab6783d3199472df95eb2 Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Fri, 5 Apr 2024 19:57:31 -0400 Subject: [PATCH] 21651: Change io panel json tab to virtual list, fix layout issues Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- .../views/process-panel/process-io-card.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/services/workbench2/src/views/process-panel/process-io-card.tsx b/services/workbench2/src/views/process-panel/process-io-card.tsx index 25bcb19e78..d9e7b87c92 100644 --- a/services/workbench2/src/views/process-panel/process-io-card.tsx +++ b/services/workbench2/src/views/process-panel/process-io-card.tsx @@ -65,7 +65,7 @@ import { ProcessOutputCollectionFiles } from "./process-output-collection-files" import { Process } from "store/processes/process"; import { navigateTo } from "store/navigation/navigation-action"; import classNames from "classnames"; -import { DefaultCodeSnippet } from "components/default-code-snippet/default-code-snippet"; +import { DefaultVirtualCodeSnippet } from "components/default-code-snippet/default-virtual-code-snippet"; import { KEEP_URL_REGEX } from "models/resource"; import { FixedSizeList } from 'react-window'; import AutoSizer from "react-virtualized-auto-sizer"; @@ -82,6 +82,7 @@ type CssRules = | "paramTableRoot" | "paramTableCellText" | "mountsTableRoot" + | "jsonWrapper" | "keepLink" | "collectionLink" | "secondaryVal" @@ -122,7 +123,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ color: theme.customs.colors.greyD, fontSize: "1.875rem", }, - // Applies to each tab's content + // Applies to table tab's content tableWrapper: { height: "auto", maxHeight: `calc(100% - ${theme.spacing.unit * 6}px)`, @@ -206,6 +207,10 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ paddingRight: "25px", }, }, + // JSON tab wrapper + jsonWrapper: { + height: `calc(100% - ${theme.spacing.unit * 6}px)`, + }, keepLink: { color: theme.palette.primary.main, textDecoration: "none", @@ -418,7 +423,7 @@ export const ProcessIOCard = withStyles(styles)( )} {(mainProcTabState === 1 || !hasParams) && ( -
+
)} @@ -505,7 +510,7 @@ export const ProcessIOCard = withStyles(styles)( )} {isRawLoaded && (subProcTabState === 1 || (!hasInputMounts && !hasOutputCollecton)) && ( -
+
)} @@ -650,9 +655,9 @@ interface ProcessIORawDataProps { } const ProcessIORaw = withStyles(styles)(({ data }: ProcessIORawDataProps) => ( - - + -- 2.30.2