Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: scales.html not loading in production #237

Merged
merged 3 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/calm-starfishes-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@adobe/leonardo-ui": patch
---

* Fix scales.html not loading in production
5 changes: 3 additions & 2 deletions docs/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To get started developing Leonardo's UI:
pnpm install

# Run local server
pnpm dev
pnpm moon run dev
```

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

### Cross-package development

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

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

```
rm -rf <leonardo-root>/.parcel-cache
rm -rf <leonardo-root>/.moon/cache
```

3. Link local Leonardo
Expand Down
1 change: 1 addition & 0 deletions docs/ui/moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ tasks:
- parcel
- build
- --no-optimize
- --no-cache
- src/index.html
- src/scales.html
- src/tools.html
Expand Down
2 changes: 1 addition & 1 deletion docs/ui/src/js/createHtmlElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function createSvgElement({element, id, className, attributes, styles, textConte
const svgns = 'http://www.w3.org/2000/svg';
const el = document.createElementNS(svgns, element);
if (id) el.id = id;
if (className) el.className = className;
if (className) el.setAttribute('class', className);
GarthDB marked this conversation as resolved.
Show resolved Hide resolved
if (styles) {
for (const [prop, value] of Object.entries(styles)) {
el.style[prop] = value;
Expand Down