Skip to content

Commit

Permalink
Drop all eventHub usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Nov 16, 2023
1 parent fc24d78 commit d59c554
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 33 deletions.
6 changes: 3 additions & 3 deletions client/src/components/Panels/Common/ToolSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const emit = defineEmits<{
(e: "onOperation", tool: any, evt: Event): void;
}>();
const eventHub = useEventBus<string>("open-tool-section");
const eventBus = useEventBus<string>("open-tool-section");
const props = defineProps({
category: {
Expand Down Expand Up @@ -134,11 +134,11 @@ watch(
);
onMounted(() => {
eventHub.on(openToolSection);
eventBus.on(openToolSection);
});
onUnmounted(() => {
eventHub.off(openToolSection);
eventBus.off(openToolSection);
});
function openToolSection(sectionId: string) {
Expand Down
21 changes: 0 additions & 21 deletions client/src/components/plugins/eventHub.js

This file was deleted.

1 change: 0 additions & 1 deletion client/src/components/plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { eventHubMixin, eventHubPlugin } from "./eventHub";
export { iconMixin, iconPlugin } from "./icons";
export { localizationPlugin } from "./localization";
export { vueRxShortcutPlugin, vueRxShortcuts } from "./vueRxShortcuts";
Expand Down
7 changes: 1 addition & 6 deletions client/src/utils/mountVueComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// the same plugins and events.

import BootstrapVue from "bootstrap-vue";
import { eventHubPlugin, iconPlugin, localizationPlugin, vueRxShortcutPlugin } from "components/plugins";
import { iconPlugin, localizationPlugin, vueRxShortcutPlugin } from "components/plugins";
import Vue from "vue";
import Vuex from "vuex";

Expand All @@ -14,11 +14,6 @@ Vue.use(Vuex);
// Bootstrap components
Vue.use(BootstrapVue);

// Add a global event bus. We could just use root but I don't think that will
// work right when we have more than one root, which we often will until the
// application has been completely converted to Vue.
Vue.use(eventHubPlugin);

// localization filters and directives
Vue.use(localizationPlugin);

Expand Down
2 changes: 0 additions & 2 deletions client/tests/jest/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
import { createLocalVue, shallowMount } from "@vue/test-utils";
import BootstrapVue from "bootstrap-vue";
import { eventHubPlugin } from "components/plugins/eventHub";
import { iconPlugin } from "components/plugins/icons";
import { localizationPlugin } from "components/plugins/localization";
import { vueRxShortcutPlugin } from "components/plugins/vueRxShortcuts";
Expand Down Expand Up @@ -190,7 +189,6 @@ export function getLocalVue(instrumentLocalization = false) {
const l = instrumentLocalization ? testLocalize : _l;
localVue.use(localizationPlugin, l);
localVue.use(vueRxShortcutPlugin);
localVue.use(eventHubPlugin);
localVue.use(iconPlugin);
localVue.directive("b-tooltip", mockedDirective);
localVue.directive("b-popover", mockedDirective);
Expand Down

0 comments on commit d59c554

Please sign in to comment.