Commit 2a98a4e0 authored by Dannon Baker's avatar Dannon Baker
Browse files

Workflow landing collapse followup, bail on router guard and just collapse it...

Workflow landing collapse followup, bail on router guard and just collapse it on component initialization.

We leave this until after the user is initialized to make sure the right storage scope is used.
parent e57aa17a
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -112,8 +112,6 @@ function isActiveSideBar(menuKey: string) {
    return activityStore.toggledSideBar === menuKey;
}

const isSideBarOpen = computed(() => activityStore.toggledSideBar !== "");

/**
 * Checks if an activity that has a panel should have the `is-active` prop
 */
+5 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ import { ref, watch } from "vue";
import { useRouter } from "vue-router/composables";

import { GalaxyApi } from "@/api";
import { useActivityStore } from "@/stores/activityStore";
import { useUserStore } from "@/stores/userStore";
import { errorMessageAsString } from "@/utils/simple-error";

@@ -32,6 +33,8 @@ const router = useRouter();
userStore.loadUser(false);
const { isAnonymous, currentUser } = storeToRefs(userStore);

const activityStore = useActivityStore("default");

watch(
    currentUser,
    async () => {
@@ -42,6 +45,8 @@ watch(
        } else if (currentUser.value) {
            let claim;
            let claimError;
            activityStore.toggleSideBar("");
            activityStore.closeSideBar();
            if (props.public) {
                const { data, error } = await GalaxyApi().GET("/api/workflow_landings/{uuid}", {
                    params: {
+0 −14
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ import AdminRoutes from "entry/analysis/routes/admin-routes";
import LibraryRoutes from "entry/analysis/routes/library-routes";
import StorageDashboardRoutes from "entry/analysis/routes/storageDashboardRoutes";
import { getAppRoot } from "onload/loadConfig";
import { PiniaVuePlugin } from "pinia";
import Vue from "vue";
import VueRouter from "vue-router";

@@ -63,7 +62,6 @@ import CreateFileSourceInstance from "@/components/FileSources/Instances/CreateI
import GridHistory from "@/components/Grid/GridHistory";
import GridPage from "@/components/Grid/GridPage";
import CreateObjectStoreInstance from "@/components/ObjectStore/Instances/CreateInstance";
import { useActivityStore } from "@/stores/activityStore";
import { parseBool } from "@/utils/utils";

import { patchRouterPush } from "./router-push";
@@ -89,8 +87,6 @@ import WorkflowPublished from "@/components/Workflow/Published/WorkflowPublished
import WorkflowInvocationState from "@/components/WorkflowInvocationState/WorkflowInvocationState.vue";

Vue.use(VueRouter);
// Load Pinia
// Vue.use(PiniaVuePlugin);

// patches $router.push() to trigger an event and hide duplication warnings
patchRouterPush(VueRouter);
@@ -522,16 +518,6 @@ export function getRouter(Galaxy) {
                    {
                        path: "workflow_landings/:uuid",
                        component: WorkflowLanding,
                        // On this route, we close any open activity panel
                        beforeEnter: (to, from, next) => {
                            // We currently only use the default activity store for routing concerns.
                            const activityStore = useActivityStore("default");
                            // Toggle the sidebar to close
                            console.debug("Closing activity panel");
                            activityStore.toggleSideBar("");
                            activityStore.closeSideBar();
                            next();
                        },
                        props: (route) => ({
                            uuid: route.params.uuid,
                            public: route.query.public.toLowerCase() === "true",