[ARVADOS-WORKBENCH2] updated: 2.1.0-431-g78e3c7b8

Git user git at public.arvados.org
Fri Jul 2 20:39:02 UTC 2021


Summary of changes:
 cypress/integration/favorites.spec.js                |  4 +---
 src/store/context-menu/context-menu-actions.ts       |  2 ++
 .../public-favorites-panel.tsx                       | 20 +++++++++++++-------
 3 files changed, 16 insertions(+), 10 deletions(-)

       via  78e3c7b8d6a4fe84989182745267d1af468dfa7f (commit)
      from  7bbd67535b2ee9e8abd3342d5a9de5a22ef786a3 (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 78e3c7b8d6a4fe84989182745267d1af468dfa7f
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date:   Fri Jul 2 22:38:13 2021 +0200

    16971: Fixed issue in other places
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>

diff --git a/cypress/integration/favorites.spec.js b/cypress/integration/favorites.spec.js
index 1f8fe41c..6c2116cf 100644
--- a/cypress/integration/favorites.spec.js
+++ b/cypress/integration/favorites.spec.js
@@ -132,7 +132,7 @@ describe('Favorites tests', function () {
             });
     });
 
-    it.only('can edit project in favorites', () => {
+    it('can edit project and collections in favorites', () => {
         cy.createProject({
             owningUser: adminUser,
             targetUser: activeUser,
@@ -148,8 +148,6 @@ describe('Favorites tests', function () {
             cy.addToFavorites(activeUser.token, activeUser.user.uuid, testTargetCollection.uuid);
         });
 
-
-
         cy.getAll('@mySharedWritableProject', '@testTargetCollection')
             .then(function ([mySharedWritableProject, testTargetCollection]) {
                 cy.loginAs(activeUser);
diff --git a/src/store/context-menu/context-menu-actions.ts b/src/store/context-menu/context-menu-actions.ts
index 1997b2a6..bda1136c 100644
--- a/src/store/context-menu/context-menu-actions.ts
+++ b/src/store/context-menu/context-menu-actions.ts
@@ -65,6 +65,7 @@ export const openCollectionFilesContextMenu = (event: React.MouseEvent<HTMLEleme
             name: '',
             uuid: '',
             ownerUuid: '',
+            description: '',
             kind: ResourceKind.COLLECTION,
             menuKind: isCollectionFileSelected
                 ? isWritable
@@ -166,6 +167,7 @@ export const openProjectContextMenu = (event: React.MouseEvent<HTMLElement>, res
                 uuid: res.uuid,
                 kind: res.kind,
                 menuKind,
+                description: res.description,
                 ownerUuid: res.ownerUuid,
                 isTrashed: ('isTrashed' in res) ? res.isTrashed : false,
             }));
diff --git a/src/views/public-favorites-panel/public-favorites-panel.tsx b/src/views/public-favorites-panel/public-favorites-panel.tsx
index 800e5e59..7e845d6c 100644
--- a/src/views/public-favorites-panel/public-favorites-panel.tsx
+++ b/src/views/public-favorites-panel/public-favorites-panel.tsx
@@ -35,6 +35,8 @@ import { createTree } from '~/models/tree';
 import { getSimpleObjectTypeFilters } from '~/store/resource-type-filters/resource-type-filters';
 import { PUBLIC_FAVORITE_PANEL_ID } from '~/store/public-favorites-panel/public-favorites-action';
 import { PublicFavoritesState } from '~/store/public-favorites/public-favorites-reducer';
+import { getResource, ResourcesState } from '~/store/resources/resources';
+import { GroupContentsResource } from '~/services/groups-service/groups-service';
 
 type CssRules = "toolbar" | "button";
 
@@ -110,24 +112,28 @@ export const publicFavoritePanelColumns: DataColumns<string> = [
 
 interface PublicFavoritePanelDataProps {
     publicFavorites: PublicFavoritesState;
+    resources: ResourcesState;
 }
 
 interface PublicFavoritePanelActionProps {
     onItemClick: (item: string) => void;
-    onContextMenu: (event: React.MouseEvent<HTMLElement>, item: string) => void;
+    onContextMenu: (resources: ResourcesState) => (event: React.MouseEvent<HTMLElement>, item: string) => void;
     onDialogOpen: (ownerUuid: string) => void;
     onItemDoubleClick: (item: string) => void;
 }
-const mapStateToProps = ({ publicFavorites }: RootState): PublicFavoritePanelDataProps => ({
-    publicFavorites
+const mapStateToProps = ({ publicFavorites, resources }: RootState): PublicFavoritePanelDataProps => ({
+    publicFavorites,
+    resources,
 });
 
 const mapDispatchToProps = (dispatch: Dispatch): PublicFavoritePanelActionProps => ({
-    onContextMenu: (event, resourceUuid) => {
+    onContextMenu: (resources: ResourcesState) => (event, resourceUuid) => {
+        const resource = getResource<GroupContentsResource>(resourceUuid)(resources);
         const kind = dispatch<any>(resourceUuidToContextMenuKind(resourceUuid));
-        if (kind) {
+        if (kind && resource) {
             dispatch<any>(openContextMenu(event, {
-                name: '',
+                name: resource.name,
+                description: resource.description,
                 uuid: resourceUuid,
                 ownerUuid: '',
                 kind: ResourceKind.NONE,
@@ -156,7 +162,7 @@ export const PublicFavoritePanel = withStyles(styles)(
                     id={PUBLIC_FAVORITE_PANEL_ID}
                     onRowClick={this.props.onItemClick}
                     onRowDoubleClick={this.props.onItemDoubleClick}
-                    onContextMenu={this.props.onContextMenu}
+                    onContextMenu={this.props.onContextMenu(this.props.resources)}
                     contextMenuColumn={true}
                     dataTableDefaultView={
                         <DataTableDefaultView

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list