From f73e5e0058fcc3bedebfbe7380ffcb44aea981b8 Mon Sep 17 00:00:00 2001 From: Pujit Mehrotra Date: Fri, 27 Jun 2025 13:33:25 -0400 Subject: [PATCH] fix(ui): notifications positioning regression (#1445) Downgrades the `vue-sonner` dependency from `2.0.0` to `1.3.0` because the newer version relies on unocss under the hood, which can't pipe across the web component build/boundary without modifying our css plumbing. The older version relied on a `styles.css` stylesheet. That stylesheet also couldn't make it through our build pipeline, but since it was a single asset, I vendored it via `sonner.css`. ## Summary by CodeRabbit * **Bug Fixes** * Improved logic to prevent duplicate insertion of the toaster element in the page layout. * **Chores** * Downgraded the "vue-sonner" dependency to version ^1.3.0. --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1210640791480730 --- .../modifications/default-page-layout.modification.ts | 2 +- pnpm-lock.yaml | 11 +++++------ unraid-ui/package.json | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/api/src/unraid-api/unraid-file-modifier/modifications/default-page-layout.modification.ts b/api/src/unraid-api/unraid-file-modifier/modifications/default-page-layout.modification.ts index 9a5b109fd..ba3e1e58d 100644 --- a/api/src/unraid-api/unraid-file-modifier/modifications/default-page-layout.modification.ts +++ b/api/src/unraid-api/unraid-file-modifier/modifications/default-page-layout.modification.ts @@ -10,7 +10,7 @@ export default class DefaultPageLayoutModification extends FileModification { public readonly filePath: string = '/usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php'; private addToaster(source: string): string { - if (source.includes('unraid-toaster')) { + if (source.includes('uui-toaster')) { return source; } const insertion = ``; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cc24394d9..056b09d01 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -839,8 +839,8 @@ importers: specifier: ^2.6.0 version: 2.6.0 vue-sonner: - specifier: ^2.0.0 - version: 2.0.0 + specifier: ^1.3.0 + version: 1.3.0 devDependencies: '@ianvs/prettier-plugin-sort-imports': specifier: ^4.4.1 @@ -11107,7 +11107,6 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} deprecated: |- You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. - (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qs@6.13.0: @@ -13116,8 +13115,8 @@ packages: peerDependencies: vue: ^3.2.0 - vue-sonner@2.0.0: - resolution: {integrity: sha512-nvlqGGWvxEv9UnKcZxsGdKpHrODEdv3CXAJF3er+1pLC03caJt2+v9HuWtRqlBQwUr1SFttsYuwVbpbEl05n4A==} + vue-sonner@1.3.0: + resolution: {integrity: sha512-jAodBy4Mri8rQjVZGQAPs4ZYymc1ywPiwfa81qU0fFl+Suk7U8NaOxIDdI1oBGLeQJqRZi/oxNIuhCLqsBmOwg==} vue-template-compiler@2.7.16: resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} @@ -27305,7 +27304,7 @@ snapshots: '@vue/devtools-api': 6.6.4 vue: 3.5.17(typescript@5.8.3) - vue-sonner@2.0.0: {} + vue-sonner@1.3.0: {} vue-template-compiler@2.7.16: dependencies: diff --git a/unraid-ui/package.json b/unraid-ui/package.json index d782a163e..2f18de9a0 100644 --- a/unraid-ui/package.json +++ b/unraid-ui/package.json @@ -61,7 +61,7 @@ "marked": "^15.0.0", "reka-ui": "^2.1.1", "tailwind-merge": "^2.6.0", - "vue-sonner": "^2.0.0" + "vue-sonner": "^1.3.0" }, "devDependencies": { "@ianvs/prettier-plugin-sort-imports": "^4.4.1",