[ARVADOS-WORKBENCH2] updated: 2.3.0-54-ga589802b
Git user
git at public.arvados.org
Thu Dec 16 13:23:13 UTC 2021
Summary of changes:
src/components/multi-panel-view/multi-panel-view.test.tsx | 2 +-
src/components/multi-panel-view/multi-panel-view.tsx | 7 +++++--
src/views/process-panel/process-panel-root.tsx | 6 +++---
3 files changed, 9 insertions(+), 6 deletions(-)
via a589802b2c9bd1a318704a78996cad389db00ad9 (commit)
via 110d09bd9d2f7b682d82139def517ae9535e8f42 (commit)
from 91ca19a62e24074f9e3ef02dfc4edb78e5233609 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit a589802b2c9bd1a318704a78996cad389db00ad9
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Thu Dec 16 10:19:44 2021 -0300
18219: Requests MPV custom props forwarding on the process panel.
Those props are properly handled so they don't generate any DOM warnings.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/src/views/process-panel/process-panel-root.tsx b/src/views/process-panel/process-panel-root.tsx
index deb5f1b0..6fb9c09d 100644
--- a/src/views/process-panel/process-panel-root.tsx
+++ b/src/views/process-panel/process-panel-root.tsx
@@ -48,7 +48,7 @@ const panelsData: MPVPanelState[] = [
export const ProcessPanelRoot = withStyles(styles)(({ process, ...props }: ProcessPanelRootProps) =>
process
? <MPVContainer className={props.classes.root} spacing={8} panelStates={panelsData} justify-content="flex-start" direction="column" wrap="nowrap">
- <MPVPanelContent xs="auto">
+ <MPVPanelContent forwardProps xs="auto">
<ProcessInformationCard
process={process}
onContextMenu={event => props.onContextMenu(event, process)}
@@ -58,10 +58,10 @@ export const ProcessPanelRoot = withStyles(styles)(({ process, ...props }: Proce
cancelProcess={props.cancelProcess}
/>
</MPVPanelContent>
- <MPVPanelContent xs="auto">
+ <MPVPanelContent forwardProps xs="auto">
<ProcessDetailsCard process={process} />
</MPVPanelContent>
- <MPVPanelContent xs>
+ <MPVPanelContent forwardProps xs>
<SubprocessPanel />
</MPVPanelContent>
</MPVContainer>
commit 110d09bd9d2f7b682d82139def517ae9535e8f42
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Thu Dec 16 10:17:31 2021 -0300
18219: Disables custom props forwarding on MPV components by default.
This is to avoid warning messages like:
Warning: React does not recognize the `panelIlluminated` prop on a DOM element.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/src/components/multi-panel-view/multi-panel-view.test.tsx b/src/components/multi-panel-view/multi-panel-view.test.tsx
index 6cf13d78..d690e82f 100644
--- a/src/components/multi-panel-view/multi-panel-view.test.tsx
+++ b/src/components/multi-panel-view/multi-panel-view.test.tsx
@@ -10,7 +10,7 @@ import { Button } from "@material-ui/core";
configure({ adapter: new Adapter() });
-const PanelMock = ({panelName, panelMaximized, doHidePanel, doMaximizePanel, children, ...rest}) =>
+const PanelMock = ({panelName, panelMaximized, doHidePanel, doMaximizePanel, panelIlluminated, panelRef, children, ...rest}) =>
<div {...rest}>{children}</div>;
describe('<MPVContainer />', () => {
diff --git a/src/components/multi-panel-view/multi-panel-view.tsx b/src/components/multi-panel-view/multi-panel-view.tsx
index dbb37921..185c3b90 100644
--- a/src/components/multi-panel-view/multi-panel-view.tsx
+++ b/src/components/multi-panel-view/multi-panel-view.tsx
@@ -64,6 +64,7 @@ interface MPVPanelDataProps {
panelMaximized?: boolean;
panelIlluminated?: boolean;
panelRef?: MutableRefObject<any>;
+ forwardProps?: boolean;
}
interface MPVPanelActionProps {
@@ -77,7 +78,7 @@ export type MPVPanelProps = MPVPanelDataProps & MPVPanelActionProps;
type MPVPanelContentProps = {children: ReactElement} & MPVPanelProps & GridProps;
// Grid item compatible component for layout and MPV props passing
-export const MPVPanelContent = ({doHidePanel, doMaximizePanel, panelName, panelMaximized, panelIlluminated, panelRef, ...props}: MPVPanelContentProps) => {
+export const MPVPanelContent = ({doHidePanel, doMaximizePanel, panelName, panelMaximized, panelIlluminated, panelRef, forwardProps, ...props}: MPVPanelContentProps) => {
useEffect(() => {
if (panelRef && panelRef.current) {
panelRef.current.scrollIntoView({behavior: 'smooth'});
@@ -87,7 +88,9 @@ export const MPVPanelContent = ({doHidePanel, doMaximizePanel, panelName, panelM
return <Grid item {...props}>
<span ref={panelRef} /> {/* Element to scroll to when the panel is selected */}
<Paper style={{height: '100%'}} elevation={panelIlluminated ? 8 : 0}>
- {React.cloneElement(props.children, { doHidePanel, doMaximizePanel, panelName, panelMaximized })}
+ { forwardProps
+ ? React.cloneElement(props.children, { doHidePanel, doMaximizePanel, panelName, panelMaximized })
+ : props.children }
</Paper>
</Grid>;
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list