[arvados] updated: 2.7.0-5848-g172df820a8

git repository hosting git at public.arvados.org
Tue Jan 30 18:39:13 UTC 2024


Summary of changes:
 .../main-content-bar/main-content-bar.tsx          | 33 +++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

       via  172df820a8c8f86b4d4fafc6722d06813bcac12d (commit)
      from  1ce0311f3df3447fc8b9a56599c350276d71118d (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 172df820a8c8f86b4d4fafc6722d06813bcac12d
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Tue Jan 30 13:39:07 2024 -0500

    21224: restored info button Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/services/workbench2/src/views-components/main-content-bar/main-content-bar.tsx b/services/workbench2/src/views-components/main-content-bar/main-content-bar.tsx
index c014c14cca..3f4de301f2 100644
--- a/services/workbench2/src/views-components/main-content-bar/main-content-bar.tsx
+++ b/services/workbench2/src/views-components/main-content-bar/main-content-bar.tsx
@@ -4,10 +4,12 @@
 
 import React from "react";
 
-import { Toolbar, StyleRulesCallback, Grid, WithStyles, withStyles } from "@material-ui/core";
+import { Toolbar, StyleRulesCallback, IconButton, Tooltip, Grid, WithStyles, withStyles } from "@material-ui/core";
+import { DetailsIcon } from "components/icon/icon";
 import { Breadcrumbs } from "views-components/breadcrumbs/breadcrumbs";
 import { connect } from 'react-redux';
 import { RootState } from 'store/store';
+import * as Routes from 'routes/routes';
 import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
 import RefreshButton from "components/refresh-button/refresh-button";
 import { loadSidePanelTreeProjects } from "store/side-panel-tree/side-panel-tree-actions";
@@ -31,9 +33,28 @@ const styles: StyleRulesCallback<CssRules> = theme => ({
 interface MainContentBarProps {
     onRefreshPage: () => void;
     onDetailsPanelToggle: () => void;
+    buttonVisible: boolean;
 }
 
+const isButtonVisible = ({ router }: RootState) => {
+    const pathname = router.location ? router.location.pathname : '';
+    return Routes.matchCollectionsContentAddressRoute(pathname) ||
+        Routes.matchPublicFavoritesRoute(pathname) ||
+        Routes.matchGroupDetailsRoute(pathname) ||
+        Routes.matchGroupsRoute(pathname) ||
+        Routes.matchUsersRoute(pathname) ||
+        Routes.matchSearchResultsRoute(pathname) ||
+        Routes.matchSharedWithMeRoute(pathname) ||
+        Routes.matchProcessRoute(pathname) ||
+        Routes.matchCollectionRoute(pathname) ||
+        Routes.matchProjectRoute(pathname) ||
+        Routes.matchAllProcessesRoute(pathname) ||
+        Routes.matchTrashRoute(pathname) ||
+        Routes.matchFavoritesRoute(pathname);
+};
+
 const mapStateToProps = (state: RootState) => ({
+    buttonVisible: isButtonVisible(state),
     projectUuid: state.detailsPanel.resourceUuid,
 });
 
@@ -55,5 +76,15 @@ export const MainContentBar = connect(mapStateToProps, mapDispatchToProps)(withS
                     props.onRefreshButtonClick(props.projectUuid);
                 }} />
             </Grid>
+            <Grid item>
+                {props.buttonVisible && <Tooltip title="Additional Info">
+                    <IconButton data-cy="additional-info-icon"
+                        color="inherit"
+                        className={props.classes.infoTooltip}
+                        onClick={props.onDetailsPanelToggle}>
+                        <DetailsIcon />
+                    </IconButton>
+                </Tooltip>}
+            </Grid>
         </Grid></Toolbar>
 ));

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list