[arvados] updated: 2.7.0-5861-g0d96b99807

git repository hosting git at public.arvados.org
Wed Feb 7 20:27:05 UTC 2024


Summary of changes:
 .../src/store/details-panel/details-panel-action.ts          |  1 +
 .../src/views-components/details-panel/details-panel.tsx     | 12 +++++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

       via  0d96b998073c51d1328a11e1d867ae1cf1cc5f9e (commit)
      from  8788e2e0732dcd21440126f94fb99d0dea0ce158 (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 0d96b998073c51d1328a11e1d867ae1cf1cc5f9e
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Wed Feb 7 15:27:01 2024 -0500

    21224: close button now always closes Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/services/workbench2/src/store/details-panel/details-panel-action.ts b/services/workbench2/src/store/details-panel/details-panel-action.ts
index bdfeaa18c1..6cf599720d 100644
--- a/services/workbench2/src/store/details-panel/details-panel-action.ts
+++ b/services/workbench2/src/store/details-panel/details-panel-action.ts
@@ -70,6 +70,7 @@ export const toggleDetailsPanel = (uuid: string = '') => (dispatch: Dispatch, ge
     const { detailsPanel, router }= getState()
     const currentRoute = router.location?.pathname.split('/') || [];
     const currentItemUuid = currentRoute[currentRoute.length - 1];
+    console.log('toggleDetailsPanel', uuid, detailsPanel.resourceUuid, currentItemUuid)
     // because of material-ui issue resizing details panel breaks tabs.
     // triggering window resize event fixes that.
     if(uuid !== detailsPanel.resourceUuid  && (detailsPanel.isOpened || uuid === currentItemUuid)){
diff --git a/services/workbench2/src/views-components/details-panel/details-panel.tsx b/services/workbench2/src/views-components/details-panel/details-panel.tsx
index 2653a21033..f4e0766d87 100644
--- a/services/workbench2/src/views-components/details-panel/details-panel.tsx
+++ b/services/workbench2/src/views-components/details-panel/details-panel.tsx
@@ -103,12 +103,13 @@ const mapStateToProps = ({ auth, detailsPanel, resources, collectionPanelFiles,
         isOpened: detailsPanel.isOpened,
         tabNr: detailsPanel.tabNr,
         res: resource || (file && file.value) || EMPTY_RESOURCE,
+        currentItemUuid
     };
 };
 
 const mapDispatchToProps = (dispatch: Dispatch) => ({
-    onCloseDrawer: () => {
-        dispatch<any>(toggleDetailsPanel());
+    onCloseDrawer: (currentItemId) => {
+        dispatch<any>(toggleDetailsPanel(currentItemId));
     },
     setActiveTab: (tabNr: number) => {
         dispatch<any>(openDetailsPanel(undefined, tabNr));
@@ -116,13 +117,14 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({
 });
 
 export interface DetailsPanelDataProps {
-    onCloseDrawer: () => void;
+    onCloseDrawer: (currentItemId) => void;
     setActiveTab: (tabNr: number) => void;
     authConfig: Config;
     isOpened: boolean;
     tabNr: number;
     res: DetailsResource;
     isFrozen: boolean;
+    currentItemUuid: string;
 }
 
 type DetailsPanelProps = DetailsPanelDataProps & WithStyles<CssRules>;
@@ -162,7 +164,7 @@ export const DetailsPanel = withStyles(styles)(
             }
 
             renderContent() {
-                const { classes, onCloseDrawer, res, tabNr, authConfig } = this.props;
+                const { classes, onCloseDrawer, res, tabNr, authConfig, currentItemUuid } = this.props;
 
                 let shouldShowInlinePreview = false;
                 if (!('kind' in res)) {
@@ -199,7 +201,7 @@ export const DetailsPanel = withStyles(styles)(
                             </Tooltip>
                         </Grid>
                         <Grid item>
-                            <IconButton color="inherit" onClick={onCloseDrawer}>
+                            <IconButton color="inherit" onClick={()=>onCloseDrawer(currentItemUuid)}>
                                 <CloseIcon />
                             </IconButton>
                         </Grid>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list