[arvados-workbench2] updated: 2.7.0-165-gfdb810ae
git repository hosting
git at public.arvados.org
Tue Oct 24 19:57:03 UTC 2023
Summary of changes:
src/store/favorites/favorites-actions.ts | 4 +-
.../public-favorites/public-favorites-actions.ts | 2 +
.../side-panel-tree/side-panel-tree-actions.ts | 48 +++++++++++-----------
3 files changed, 28 insertions(+), 26 deletions(-)
via fdb810aee6d7ee83f3ccea81e21dac1a4c3823d6 (commit)
from cfa88a0915d5a49a6eb870505c346db2dbd58648 (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 fdb810aee6d7ee83f3ccea81e21dac1a4c3823d6
Author: Lisa Knox <lisaknox83 at gmail.com>
Date: Tue Oct 24 15:56:58 2023 -0400
19302: sidePanel public faves updates, renamed 2 overloaded symbols Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>
diff --git a/src/store/favorites/favorites-actions.ts b/src/store/favorites/favorites-actions.ts
index 8697e686..1e23f35c 100644
--- a/src/store/favorites/favorites-actions.ts
+++ b/src/store/favorites/favorites-actions.ts
@@ -10,7 +10,7 @@ import { checkFavorite } from "./favorites-reducer";
import { snackbarActions, SnackbarKind } from "../snackbar/snackbar-actions";
import { ServiceRepository } from "services/services";
import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions";
-import { loadFavorites} from "store/side-panel-tree/side-panel-tree-actions";
+import { loadFavoritesTree} from "store/side-panel-tree/side-panel-tree-actions";
export const favoritesActions = unionize({
TOGGLE_FAVORITE: ofType<{ resourceUuid: string }>(),
@@ -52,7 +52,7 @@ export const toggleFavorite = (resource: { uuid: string; name: string }) =>
kind: SnackbarKind.SUCCESS
}));
dispatch(progressIndicatorActions.STOP_WORKING("toggleFavorite"));
- dispatch<any>(loadFavorites())
+ dispatch<any>(loadFavoritesTree())
})
.catch((e: any) => {
dispatch(progressIndicatorActions.STOP_WORKING("toggleFavorite"));
diff --git a/src/store/public-favorites/public-favorites-actions.ts b/src/store/public-favorites/public-favorites-actions.ts
index 2d4539ad..363b0b44 100644
--- a/src/store/public-favorites/public-favorites-actions.ts
+++ b/src/store/public-favorites/public-favorites-actions.ts
@@ -9,6 +9,7 @@ import { checkPublicFavorite } from "./public-favorites-reducer";
import { snackbarActions, SnackbarKind } from "store/snackbar/snackbar-actions";
import { ServiceRepository } from "services/services";
import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions";
+import { loadPublicFavoritesTree } from "store/side-panel-tree/side-panel-tree-actions";
export const publicFavoritesActions = unionize({
TOGGLE_PUBLIC_FAVORITE: ofType<{ resourceUuid: string }>(),
@@ -48,6 +49,7 @@ export const togglePublicFavorite = (resource: { uuid: string; name: string }) =
kind: SnackbarKind.SUCCESS
}));
dispatch(progressIndicatorActions.STOP_WORKING("togglePublicFavorite"));
+ dispatch<any>(loadPublicFavoritesTree())
})
.catch((e: any) => {
dispatch(progressIndicatorActions.STOP_WORKING("togglePublicFavorite"));
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index 1105285f..a76878f2 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -96,9 +96,9 @@ export const loadSidePanelTreeProjects = (projectUuid: string) =>
const treePicker = getTreePicker(SIDE_PANEL_TREE)(getState().treePicker);
const node = treePicker ? getNode(projectUuid)(treePicker) : undefined;
if (projectUuid === SidePanelTreeCategory.PUBLIC_FAVORITES) {
- await dispatch<any>(loadPublicFavorites);
+ await dispatch<any>(loadPublicFavoritesTree());
} else if (projectUuid === SidePanelTreeCategory.FAVORITES) {
- await dispatch<any>(loadFavorites());
+ await dispatch<any>(loadFavoritesTree());
} else if (node || projectUuid !== '') {
await dispatch<any>(loadProject(projectUuid));
}
@@ -124,33 +124,33 @@ const loadProject = (projectUuid: string) =>
dispatch(resourcesActions.SET_RESOURCES(items));
};
-export const loadFavorites =()=> async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+export const loadFavoritesTree = () => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.FAVORITES, pickerId: SIDE_PANEL_TREE }));
const params = {
filters: new FilterBuilder()
- .addEqual("link_class", LinkClass.STAR)
+ .addEqual('link_class', LinkClass.STAR)
.addEqual('tail_uuid', getUserUuid(getState()))
.addEqual('tail_kind', ResourceKind.USER)
.getFilters(),
- order: new OrderBuilder<ProjectResource>()
- .addDesc('createdAt')
- .getOrder(),
- limit: 50
- }
+ order: new OrderBuilder<ProjectResource>().addDesc('createdAt').getOrder(),
+ limit: 50,
+ };
const { items } = await services.linkService.list(params);
- dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
- id: SidePanelTreeCategory.FAVORITES,
- pickerId: SIDE_PANEL_TREE,
- nodes: items.map(item => initTreeNode({ id: item.headUuid, value: item })),
- }));
+ dispatch(
+ treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
+ id: SidePanelTreeCategory.FAVORITES,
+ pickerId: SIDE_PANEL_TREE,
+ nodes: items.map(item => initTreeNode({ id: item.headUuid, value: item })),
+ })
+ );
dispatch(resourcesActions.SET_RESOURCES(items));
};
-const loadPublicFavorites = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+export const loadPublicFavoritesTree = () => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.PUBLIC_FAVORITES, pickerId: SIDE_PANEL_TREE }));
const uuidPrefix = getState().auth.config.uuidPrefix;
@@ -163,19 +163,19 @@ const loadPublicFavorites = async (dispatch: Dispatch, getState: () => RootState
.addEqual('owner_uuid', publicProjectUuid)
.addIsA('head_uuid', typeFilters)
.getFilters(),
- order: new OrderBuilder<ProjectResource>()
- .addDesc('createdAt')
- .getOrder(),
- limit: TREE_NODE_LIMIT
+ order: new OrderBuilder<ProjectResource>().addDesc('createdAt').getOrder(),
+ limit: TREE_NODE_LIMIT,
};
const { items } = await services.linkService.list(params);
- dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
- id: SidePanelTreeCategory.PUBLIC_FAVORITES,
- pickerId: SIDE_PANEL_TREE,
- nodes: items.map(item => initTreeNode({ id: item.headUuid, value: item })),
- }));
+ dispatch(
+ treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
+ id: SidePanelTreeCategory.PUBLIC_FAVORITES,
+ pickerId: SIDE_PANEL_TREE,
+ nodes: items.map(item => initTreeNode({ id: item.headUuid, value: item })),
+ })
+ );
dispatch(resourcesActions.SET_RESOURCES(items));
};
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list