[arvados] updated: 2.7.0-6052-gb321ea05ba

git repository hosting git at public.arvados.org
Mon Mar 18 17:59:31 UTC 2024


Summary of changes:
 .../project-details-card/project-details-card.tsx  | 24 +++++++++++++---------
 1 file changed, 14 insertions(+), 10 deletions(-)

       via  b321ea05ba350bb48e4b86c8fd73cea924d4b61d (commit)
      from  cdd92ba7203c70eabd4faea8a36a558f7817ce82 (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 b321ea05ba350bb48e4b86c8fd73cea924d4b61d
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Mar 18 13:59:25 2024 -0400

    21224: card toolbar tooggles correctly Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/services/workbench2/src/views-components/project-details-card/project-details-card.tsx b/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
index ffe5e679e0..ba2e43d071 100644
--- a/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
+++ b/services/workbench2/src/views-components/project-details-card/project-details-card.tsx
@@ -41,6 +41,7 @@ type CssRules =
     | 'faveIcon'
     | 'frozenIcon'
     | 'contextMenuSection'
+    | 'toolbarSection'
     | 'tag'
     | 'description';
 
@@ -50,10 +51,10 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
         marginBottom: '1rem',
         flex: '0 0 auto',
         padding: 0,
-        border: '2px solid transparent',
+        borderLeft: '2px solid transparent',
     },
     selected: {
-        border: '2px solid #ccc',
+        border: '2pcx solid #ccc',
     },
     showMore: {
         cursor: 'pointer',
@@ -113,6 +114,9 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
         alignItems: 'center',
         paddingTop: '0.25rem',
     },
+    toolbarSection: {
+        marginTop: '-1rem',
+    },
     tag: {
         marginRight: '1rem',
         marginTop: '1rem',
@@ -123,16 +127,14 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     },
 });
 
-const mapStateToProps = (state: RootState) => {
-    const currentRoute = state.router.location?.pathname.split('/') || [];
-    const currentItemUuid = currentRoute[currentRoute.length - 1];
-    const currentResource = getResource(currentItemUuid)(state.resources);
-    const frozenByUser = currentResource && getResource((currentResource as ProjectResource).frozenByUuid as string)(state.resources);
+const mapStateToProps = ({auth, selectedResourceUuid, resources, properties}: RootState) => {
+    const currentResource = getResource(properties.currentRouteUuid)(resources);
+    const frozenByUser = currentResource && getResource((currentResource as ProjectResource).frozenByUuid as string)(resources);
     const frozenByFullName = frozenByUser && (frozenByUser as Resource & { fullName: string }).fullName;
-    const isSelected = currentItemUuid === state.detailsPanel.resourceUuid && state.detailsPanel.isOpened === true;
+    const isSelected = selectedResourceUuid === properties.currentRouteUuid;
 
     return {
-        isAdmin: state.auth.user?.isAdmin,
+        isAdmin: auth.user?.isAdmin,
         currentResource,
         frozenByFullName,
         isSelected,
@@ -336,7 +338,9 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ classes, currentResource, fro
                     </section>
                 }
                 action={
-                    <MultiselectToolbar />
+                    <section className={classes.toolbarSection}>
+                        {isSelected && <MultiselectToolbar />}
+                    </section>
                 }
             />
             <section onClick={(ev) => ev.stopPropagation()}>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list