Skip to content

Commit 7572964

Browse files
authored
Merge pull request #22095 from dannon/scratchbook-styling
Replace WinBox with native Vue scratchbook component
2 parents dc39768 + 5f037de commit 7572964

19 files changed

Lines changed: 728 additions & 486 deletions

File tree

client/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@
133133
"vue-virtual-scroll-list": "^2.3.5",
134134
"vue2-teleport": "^1.0.1",
135135
"vuedraggable": "^2.24.3",
136-
"winbox": "^0.2.82",
137136
"xml-beautifier": "^0.5.0",
138137
"yaml": "^2.6.1"
139138
},

client/pnpm-lock.yaml

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/components/ChatGXY.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ async function deleteCurrentChat() {
320320
}
321321
}
322322
323-
function popOutToScratchbook() {
323+
function popOutToWindowManager() {
324324
const Galaxy = getGalaxyInstance();
325325
const path = currentChatId.value ? `/chatgxy/${currentChatId.value}` : "/chatgxy";
326326
const url = `${path}?compact=true`;
@@ -349,7 +349,7 @@ function popOutToScratchbook() {
349349
<button
350350
class="btn btn-sm btn-outline-primary"
351351
title="Open in floating window"
352-
@click="popOutToScratchbook">
352+
@click="popOutToWindowManager">
353353
<FontAwesomeIcon :icon="faExternalLinkAlt" fixed-width />
354354
</button>
355355
</div>

client/src/components/Masthead/Masthead.test.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { faTh } from "@fortawesome/free-solid-svg-icons";
12
import { createTestingPinia } from "@pinia/testing";
23
import { getFakeRegisteredUser } from "@tests/test-data";
34
import { getLocalVue } from "@tests/vitest/helpers";
@@ -7,7 +8,6 @@ import flushPromises from "flush-promises";
78
import { PiniaVuePlugin } from "pinia";
89
import { beforeEach, describe, expect, it, vi } from "vitest";
910

10-
import { WindowManager } from "@/entry/analysis/window-manager";
1111
import { useUserStore } from "@/stores/userStore";
1212

1313
import { loadMastheadWebhooks } from "./_webhooks";
@@ -28,7 +28,7 @@ setupMockConfig({});
2828
describe("Masthead.vue", () => {
2929
let wrapper;
3030
let localVue;
31-
let windowManager;
31+
let windowTab;
3232
let testPinia;
3333

3434
function stubLoadWebhooks(items) {
@@ -46,8 +46,16 @@ describe("Masthead.vue", () => {
4646
localVue.use(PiniaVuePlugin);
4747
testPinia = createTestingPinia({ createSpy: vi.fn });
4848

49-
windowManager = new WindowManager({});
50-
const windowTab = windowManager.getTab();
49+
windowTab = {
50+
id: "enable-window-manager",
51+
icon: faTh,
52+
tooltip: "Enable/Disable Window Manager",
53+
visible: true,
54+
_active: false,
55+
onclick: function () {
56+
this._active = !this._active;
57+
},
58+
};
5159

5260
const userStore = useUserStore();
5361
userStore.currentUser = currentUser;
@@ -71,9 +79,9 @@ describe("Masthead.vue", () => {
7179

7280
it("should display window manager button", async () => {
7381
expect(wrapper.find("#enable-window-manager a svg").exists()).toBe(true);
74-
expect(windowManager.active).toBe(false);
82+
expect(windowTab._active).toBe(false);
7583
await wrapper.find("#enable-window-manager a").trigger("click");
76-
expect(windowManager.active).toBe(true);
84+
expect(windowTab._active).toBe(true);
7785
});
7886

7987
it("should load webhooks on creation", async () => {

0 commit comments

Comments
 (0)