Skip to content

Commit b5dbb3d

Browse files
authored
fix: scales.html not loading in production (#237)
* fix: scales.html not loading in production, closes #236
1 parent f98a273 commit b5dbb3d

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

.changeset/calm-starfishes-thank.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@adobe/leonardo-ui": patch
3+
---
4+
5+
* Fix scales.html not loading in production

docs/ui/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To get started developing Leonardo's UI:
1717
pnpm install
1818

1919
# Run local server
20-
pnpm dev
20+
pnpm moon run dev
2121
```
2222

2323
Then, visit the live reloading web UIs here:
@@ -28,7 +28,7 @@ http://localhost:1234/tools.html
2828

2929
### Cross-package development
3030

31-
When making updates to `@adobe/leonardo-contrast-colors` while also developing the user interface, some issues may occur while linking the local dependency.
31+
When making updates to `@adobe/leonardo-contrast-colors` while also developing the user interface, some issues may occur while linking the local dependency.
3232
Follow these steps **every time you install or update an npm dependency**:
3333

3434
1. Install your new dependency
@@ -41,6 +41,7 @@ pnpm add my-new-package
4141

4242
```
4343
rm -rf <leonardo-root>/.parcel-cache
44+
rm -rf <leonardo-root>/.moon/cache
4445
```
4546

4647
3. Link local Leonardo

docs/ui/moon.yml

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ tasks:
8282
- parcel
8383
- build
8484
- --no-optimize
85+
- --no-cache
8586
- src/index.html
8687
- src/scales.html
8788
- src/tools.html

docs/ui/src/js/createHtmlElement.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function createSvgElement({element, id, className, attributes, styles, textConte
4141
const svgns = 'http://www.w3.org/2000/svg';
4242
const el = document.createElementNS(svgns, element);
4343
if (id) el.id = id;
44-
if (className) el.className = className;
44+
if (className) el.setAttribute('class', className);
4545
if (styles) {
4646
for (const [prop, value] of Object.entries(styles)) {
4747
el.style[prop] = value;

0 commit comments

Comments
 (0)