Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release_24.1' into usegalaxy
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Jun 24, 2024
2 parents 8bff735 + 4709165 commit 26b12d3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
21 changes: 16 additions & 5 deletions client/src/utils/mountVueComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import BootstrapVue from "bootstrap-vue";
import { iconPlugin, localizationPlugin, vueRxShortcutPlugin } from "components/plugins";
import { getActivePinia, PiniaVuePlugin } from "pinia";
import { createPinia, getActivePinia, PiniaVuePlugin } from "pinia";
import Vue from "vue";

// Load Pinia
Expand All @@ -22,17 +22,28 @@ Vue.use(vueRxShortcutPlugin);
// font-awesome svg icon registration/loading
Vue.use(iconPlugin);

function getOrCreatePinia() {
// We sometimes use this utility mounting function in a context where there
// is no existing vue application or pinia store (e.g. individual charts
// displayed in an iframe).
// To support both use cases, we will create a new pinia store and attach it to the
// vue application that is created for the component.
let pinia = getActivePinia();
if (!pinia) {
pinia = createPinia();
}
return pinia;
}

export const mountVueComponent = (ComponentDefinition) => {
const component = Vue.extend(ComponentDefinition);
const pinia = getActivePinia();
return (propsData, el) => new component({ propsData, el, pinia });
return (propsData, el) => new component({ propsData, el, pinia: getOrCreatePinia() });
};

export const replaceChildrenWithComponent = (el, ComponentDefinition, propsData = {}) => {
const container = document.createElement("div");
el.replaceChildren(container);
const component = Vue.extend(ComponentDefinition);
const pinia = getActivePinia();
const mountFn = (propsData, el) => new component({ propsData, el, pinia });
const mountFn = (propsData, el) => new component({ propsData, el, pinia: getOrCreatePinia() });
return mountFn(propsData, container);
};
3 changes: 3 additions & 0 deletions doc/source/releases/24.1_announce.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ See the `community hub <https://galaxyproject.org/develop/source-code/>`__ for a
Administration Notes
===========================================================

* ``fastapi`` dependency has been replaced with ``fastapi-slim`` [`#18095 <https://github.com/galaxyproject/galaxy/pull/18095>`__]. To ensure a smooth upgrade, you should uninstall ``fastapi`` before upgrading.
If you have upgraded without uninstalling ``fastapi``, you should uninstall ``fastapi``, then install ``fastapi-slim``.

* Empowerinig users to bring their own storage and file sources [`#18127 <https://github.com/galaxyproject/galaxy/pull/18127>`__]

* Enabling storage management by object store [`#17500 <https://github.com/galaxyproject/galaxy/pull/17500>`__]
Expand Down

0 comments on commit 26b12d3

Please sign in to comment.