Skip to content

Commit f73e5e0

Browse files
authored
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`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## 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. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1210640791480730
1 parent 64ccea2 commit f73e5e0

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

api/src/unraid-api/unraid-file-modifier/modifications/default-page-layout.modification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default class DefaultPageLayoutModification extends FileModification {
1010
public readonly filePath: string = '/usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php';
1111

1212
private addToaster(source: string): string {
13-
if (source.includes('unraid-toaster')) {
13+
if (source.includes('uui-toaster')) {
1414
return source;
1515
}
1616
const insertion = `<uui-toaster rich-colors close-button position="<?= ($notify['position'] === 'center') ? 'top-center' : $notify['position'] ?>"></uui-toaster>`;

pnpm-lock.yaml

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

unraid-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"marked": "^15.0.0",
6262
"reka-ui": "^2.1.1",
6363
"tailwind-merge": "^2.6.0",
64-
"vue-sonner": "^2.0.0"
64+
"vue-sonner": "^1.3.0"
6565
},
6666
"devDependencies": {
6767
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",

0 commit comments

Comments
 (0)