@jskit-ai/workspaces-web 0.2.20 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - The workspace-surfaces pattern's pending-invitations cue links to the account settings' invitations section at its own address, `/account/invites`, as users-web's routed sections have it, instead of `/account?section=invites`.
5
6
  - The workspaces and invitations screens and the workspace-surfaces pattern's panels sit directly on the page, without bordered sheets; the invite landing and the members screen use elevated Material 3 cards; titles use Material 3 type classes instead of hand-sized ones. Buttons are Material 3's 40dp buttons inside material-web's 48dp touch target, no longer stretched to 48px; the workspace list's and invitations' buttons are default size instead of small.
6
7
  - Icons are Material Symbols `$aliases` (from `@jskit-ai/material-web`) instead of `@mdi/js` paths, and text uses Vuetify 4's Material 3 type classes (`text-body-large`, `text-title-medium`, ...) instead of Material 2 ones, which Vuetify 4 no longer styles. Upgrading: see the guide's [Move an app to the Material 3 defaults](https://mobily-enterprises.github.io/jskit-ai/guide/app-setup/material-3-migration).
7
8
 
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@jskit-ai/workspaces-web",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "type": "module",
5
5
  "scripts": {
6
- "test": "node --test --test-concurrency=1"
6
+ "test": "jskit test"
7
7
  },
8
8
  "exports": {
9
9
  "./client": "./src/client/index.js",
@@ -16,15 +16,15 @@
16
16
  "./locales/en.json": "./locales/en.json"
17
17
  },
18
18
  "dependencies": {
19
- "@jskit-ai/users-core": "0.2.12",
20
- "@jskit-ai/workspaces-core": "0.2.12"
19
+ "@jskit-ai/users-core": "0.2.13",
20
+ "@jskit-ai/workspaces-core": "0.2.13"
21
21
  },
22
22
  "peerDependencies": {
23
- "@jskit-ai/auth-web": "0.2.15",
24
- "@jskit-ai/http-web": "0.2.18",
25
- "@jskit-ai/kernel": "0.2.10",
26
- "@jskit-ai/shell-web": "0.2.13",
27
- "@jskit-ai/users-web": "0.2.20",
23
+ "@jskit-ai/auth-web": "0.2.16",
24
+ "@jskit-ai/http-web": "0.2.19",
25
+ "@jskit-ai/kernel": "0.2.11",
26
+ "@jskit-ai/shell-web": "0.2.14",
27
+ "@jskit-ai/users-web": "0.2.21",
28
28
  "@tanstack/vue-query": "^5.90.5",
29
29
  "vue": "^3.5.13",
30
30
  "vue-router": "^5.0.4",
@@ -276,6 +276,6 @@
276
276
  }
277
277
  },
278
278
  "devDependencies": {
279
- "@jskit-ai/material-web": "0.1.2"
279
+ "@jskit-ai/material-web": "0.1.3"
280
280
  }
281
281
  }
@@ -57,16 +57,16 @@ const isVisible = computed(() => {
57
57
 
58
58
  const resolvedTo = computed(() => {
59
59
  const hasAccountSurface = Boolean(resolveSurfaceDefinitionFromPlacementContext(placementContext.value, "account"));
60
+ // The invitations section of account settings, /account/invites.
60
61
  const accountSettingsPath = hasAccountSurface
61
- ? resolveSurfacePathFromPlacementContext(placementContext.value, "account", "/")
62
- : "/account";
62
+ ? resolveSurfacePathFromPlacementContext(placementContext.value, "account", "/invites")
63
+ : "/account/invites";
63
64
  const accountSettingsNavigation = resolveSurfaceNavigationTargetFromPlacementContext(placementContext.value, {
64
65
  path: accountSettingsPath,
65
66
  surfaceId: "account"
66
67
  });
67
68
 
68
69
  const query = new URLSearchParams({
69
- section: "invites",
70
70
  returnTo: accountSettingsNavigation.sameOrigin ? resolveReturnTo() : resolveReturnToHref()
71
71
  });
72
72
  return appendQueryString(accountSettingsPath, query.toString());
@@ -14,7 +14,7 @@ import { RouterView } from "vue-router";
14
14
  </script>
15
15
 
16
16
  <template>
17
- <ShellLayout title="" subtitle="">
17
+ <ShellLayout>
18
18
  <RouterView />
19
19
  </ShellLayout>
20
20
  </template>
@@ -14,7 +14,7 @@ import { RouterView } from "vue-router";
14
14
  </script>
15
15
 
16
16
  <template>
17
- <ShellLayout title="" subtitle="">
17
+ <ShellLayout>
18
18
  <RouterView />
19
19
  </ShellLayout>
20
20
  </template>
@@ -1,19 +1,19 @@
1
1
  import assert from "node:assert/strict";
2
2
  import test from "node:test";
3
3
  import { fileURLToPath } from "node:url";
4
- import { chromium, expect } from "@playwright/test";
4
+ import { expect } from "@playwright/test";
5
5
  import { createWorkspaceRoleCatalog } from "../../workspaces-core/src/shared/roles.js";
6
- import { createChromiumLaunchOptions, startViteFixture, stopProcess } from "../../../tooling/testUtils/browserFixture.mjs";
6
+ import { sharedBrowserFixture } from "../../../tooling/testUtils/browserFixture.mjs";
7
+
8
+ const openFixture = sharedBrowserFixture({ fixtureRoot: fileURLToPath(new URL("../fixtures/role-labels/", import.meta.url)) });
7
9
 
8
10
  test("Members displays configured labels but sends and reloads role IDs", {
9
11
  skip: process.env.JSKIT_WORKSPACE_ROLE_LABELS_BROWSER !== "1",
10
12
  timeout: 120_000
11
- }, async () => {
12
- const runtime = await startViteFixture({ fixtureRoot: fileURLToPath(new URL("../fixtures/role-labels/", import.meta.url)) });
13
- let browser;
13
+ }, async (t) => {
14
+ const { vite: runtime, browser } = await openFixture(t);
14
15
  let page;
15
16
  try {
16
- browser = await chromium.launch(createChromiumLaunchOptions());
17
17
  page = await browser.newPage({ baseURL: runtime.baseURL });
18
18
  page.setDefaultTimeout(15_000);
19
19
  page.setDefaultNavigationTimeout(60_000);
@@ -109,7 +109,6 @@ test("Members displays configured labels but sends and reloads role IDs", {
109
109
  console.error(await page?.locator("body").innerText());
110
110
  throw error;
111
111
  } finally {
112
- if (browser) await browser.close();
113
- await stopProcess(runtime);
112
+ await browser.close();
114
113
  }
115
114
  });
@@ -1,8 +1,8 @@
1
1
  import assert from "node:assert/strict";
2
2
  import test from "node:test";
3
3
  import { fileURLToPath } from "node:url";
4
- import { chromium, expect } from "@playwright/test";
5
- import { createChromiumLaunchOptions, startViteFixture, stopProcess } from "../../../tooling/testUtils/browserFixture.mjs";
4
+ import { expect } from "@playwright/test";
5
+ import { sharedBrowserFixture } from "../../../tooling/testUtils/browserFixture.mjs";
6
6
 
7
7
  const VIEWPORTS = [
8
8
  { name: "phone", width: 390, height: 844 },
@@ -259,14 +259,14 @@ async function checkInvitesSection(page, viewport) {
259
259
  assert.deepEqual(unexpected, []);
260
260
  }
261
261
 
262
+ const openFixture = sharedBrowserFixture({ fixtureRoot: fileURLToPath(new URL("../fixtures/workspaces-components/", import.meta.url)) });
263
+
262
264
  test("The workspace selector and the account invitations work in a real browser", {
263
265
  skip: process.env.JSKIT_WORKSPACES_WEB_COMPONENTS_BROWSER !== "1",
264
266
  timeout: 240_000
265
267
  }, async (t) => {
266
- const runtime = await startViteFixture({ fixtureRoot: fileURLToPath(new URL("../fixtures/workspaces-components/", import.meta.url)) });
267
- let browser;
268
+ const { vite: runtime, browser } = await openFixture(t);
268
269
  try {
269
- browser = await chromium.launch(createChromiumLaunchOptions());
270
270
  for (const [name, check] of [
271
271
  ["the selector lists the workspaces, marks the current one and opens the chosen one", checkWorkspaceSelector],
272
272
  ["the invitations load, list, refuse and join through the redeem endpoint", checkInvitesSection]
@@ -287,7 +287,6 @@ test("The workspace selector and the account invitations work in a real browser"
287
287
  }
288
288
  }
289
289
  } finally {
290
- if (browser) await browser.close();
291
- await stopProcess(runtime);
290
+ await browser.close();
292
291
  }
293
292
  });
@@ -1,8 +1,8 @@
1
1
  import assert from "node:assert/strict";
2
2
  import test from "node:test";
3
3
  import { fileURLToPath } from "node:url";
4
- import { chromium, expect } from "@playwright/test";
5
- import { createChromiumLaunchOptions, startViteFixture, stopProcess } from "../../../tooling/testUtils/browserFixture.mjs";
4
+ import { expect } from "@playwright/test";
5
+ import { sharedBrowserFixture } from "../../../tooling/testUtils/browserFixture.mjs";
6
6
 
7
7
  const VIEWPORTS = [
8
8
  { name: "compact", width: 390, height: 844 },
@@ -18,15 +18,15 @@ function createDeferred() {
18
18
  return { promise, resolve };
19
19
  }
20
20
 
21
+ const openFixture = sharedBrowserFixture({ fixtureRoot: fileURLToPath(new URL("../fixtures/workspaces-landing/", import.meta.url)) });
22
+
21
23
  test("Your workspaces keeps its layout while responding and then opens the last workspace", {
22
24
  skip: process.env.JSKIT_WORKSPACES_LANDING_BROWSER !== "1",
23
25
  timeout: 180_000
24
- }, async () => {
25
- const runtime = await startViteFixture({ fixtureRoot: fileURLToPath(new URL("../fixtures/workspaces-landing/", import.meta.url)) });
26
- let browser;
26
+ }, async (t) => {
27
+ const { vite: runtime, browser } = await openFixture(t);
27
28
  let page;
28
29
  try {
29
- browser = await chromium.launch(createChromiumLaunchOptions());
30
30
  for (const viewport of VIEWPORTS) {
31
31
  page = await browser.newPage({ baseURL: runtime.baseURL, viewport });
32
32
  page.setDefaultTimeout(15_000);
@@ -112,7 +112,6 @@ test("Your workspaces keeps its layout while responding and then opens the last
112
112
  console.error(await page?.locator("body").innerText());
113
113
  throw error;
114
114
  } finally {
115
- if (browser) await browser.close();
116
- await stopProcess(runtime);
115
+ await browser.close();
117
116
  }
118
117
  });