From f76b83e9fb15ca7f05df79d025070dd7cbac5295 Mon Sep 17 00:00:00 2001 From: Emma Segal-Grossman Date: Mon, 15 Apr 2024 16:53:19 -0400 Subject: [PATCH] Fix icons in 1.9.8 (#1680) Closes #1676. Loads `sl-icon` synchronously to get correct base path when running webpack-dev-server and in prod Partially cherry-picked from 548261e663736eff1700f12e247d36dce5405dfa by @SuaYoo. --- frontend/package.json | 2 +- frontend/src/shoelace.ts | 5 ++--- frontend/yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index c6ea8554a6..23ec623a8b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,7 +8,7 @@ "@lit/localize": "^0.12.1", "@novnc/novnc": "^1.4.0-beta", "@rollup/plugin-commonjs": "^18.0.0", - "@shoelace-style/shoelace": "^2.8.0", + "@shoelace-style/shoelace": "~2.10.0", "@types/color": "^3.0.2", "@types/lodash": "^4.14.178", "@types/sinon": "^10.0.6", diff --git a/frontend/src/shoelace.ts b/frontend/src/shoelace.ts index 9f8ba06189..0ab484b0c9 100644 --- a/frontend/src/shoelace.ts +++ b/frontend/src/shoelace.ts @@ -7,6 +7,7 @@ import { registerIconLibrary } from "@shoelace-style/shoelace/dist/utilities/ico import "@shoelace-style/shoelace/dist/themes/light.css"; import "@shoelace-style/shoelace/dist/components/alert/alert"; import "@shoelace-style/shoelace/dist/components/button/button"; +import "@shoelace-style/shoelace/dist/components/icon/icon"; import "@shoelace-style/shoelace/dist/components/input/input"; import "@shoelace-style/shoelace/dist/components/checkbox/checkbox"; import "@shoelace-style/shoelace/dist/components/details/details"; @@ -22,6 +23,7 @@ import "@shoelace-style/shoelace/dist/components/switch/switch"; import "@shoelace-style/shoelace/dist/components/textarea/textarea"; import "@shoelace-style/shoelace/dist/components/mutation-observer/mutation-observer"; import "@shoelace-style/shoelace/dist/components/progress-bar/progress-bar"; + import( /* webpackChunkName: "shoelace" */ "@shoelace-style/shoelace/dist/components/dialog/dialog" ); @@ -34,9 +36,6 @@ import( import( /* webpackChunkName: "shoelace" */ "@shoelace-style/shoelace/dist/components/format-date/format-date" ); -import( - /* webpackChunkName: "shoelace" */ "@shoelace-style/shoelace/dist/components/icon/icon" -); import( /* webpackChunkName: "shoelace" */ "@shoelace-style/shoelace/dist/components/menu/menu" ); diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 935bd8c106..777bfa44a5 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -753,10 +753,10 @@ resolved "https://registry.yarnpkg.com/@shoelace-style/localize/-/localize-3.1.2.tgz#2c63f16d8aa80842dbe5127845c76ed53f6a5e8e" integrity sha512-Hf45HeO+vdQblabpyZOTxJ4ZeZsmIUYXXPmoYrrR4OJ5OKxL+bhMz5mK8JXgl7HsoEowfz7+e248UGi861de9Q== -"@shoelace-style/shoelace@^2.8.0": - version "2.12.0" - resolved "https://registry.yarnpkg.com/@shoelace-style/shoelace/-/shoelace-2.12.0.tgz#8fa21ccfc28114cb5ce8126adb412dc4abf855df" - integrity sha512-1Amirj0c5WLkymDcP6ZQmBfMC6zTNmGGK7/mjmGq4yhljrVaECVlBoKm0tfmo1jd3r8XJ8xYbQ8cxPAlwiDDvw== +"@shoelace-style/shoelace@~2.10.0": + version "2.10.0" + resolved "https://registry.yarnpkg.com/@shoelace-style/shoelace/-/shoelace-2.10.0.tgz#373660831f3f0f161ebae5a29e3e27f92f6c0fb8" + integrity sha512-bS9S2yqFZE+P4CqOa3vP1kMgSzVLKi1aTx9VYEW47YoR+TZuMkwgcPsJlAHb4Dw+MmaBqGO9XLhSIfq9pZpCug== dependencies: "@ctrl/tinycolor" "^4.0.2" "@floating-ui/dom" "^1.5.3"