Skip to content

Fix Pages: relative paths for toolbar logo + CLJS export script#4

Merged
avanelsas merged 1 commit into
mainfrom
feature/relative-toolbar-assets
Apr 27, 2026
Merged

Fix Pages: relative paths for toolbar logo + CLJS export script#4
avanelsas merged 1 commit into
mainfrom
feature/relative-toolbar-assets

Conversation

@avanelsas
Copy link
Copy Markdown
Owner

Summary

Two more absolute-path leaks the earlier static-html fix missed, both surfacing as 404s on the hosted Pages demo:

  1. Toolbar brand logo (src/bareforge/ui/toolbar.cljs): <source srcset=\"/assets/bareforge_darkmode.png\"> and <img src=\"/assets/bareforge_lightmode.png\">. The Pages site at /bareforge/ resolved them to the user-pages root (/assets/... → 404) → broken brand logo. Console error visible to the user.

  2. CLJS export plugin's emitted index.html (src/bareforge/export/cljs_project.cljs): hard-coded <script src=\"/js/main.js\">. Same bug shape — users hosting their exported project at a sub-path would see a 404. Made relative for consistency.

What this does NOT fix

The <feGaussianBlur stdDeviation=\"var(--x-welcome-...)\"> warning visible alongside the 404 is upstream in BareDOM 2.4.0's x-welcome-tour SVG markup — a CSS variable bound to a numeric SVG attribute that doesn't accept var(). SVG ignores the bad value and falls back to default blur. Cosmetic console noise, not a functional bug. Will file upstream against BareDOM separately.

Test plan

  • All four PR-readiness gates green locally.
  • CI passes the same four on this PR.
  • After merge + gh workflow run pages.yml redeploy, the brand-logo 404 disappears from the deployed editor's console.

Two more absolute paths missed by the earlier static-html fix:

- src/bareforge/ui/toolbar.cljs: brand <picture> used
  /assets/bareforge_{darkmode,lightmode}.png. The deployed Pages
  site at /bareforge/ resolved them to /assets/... at the user-pages
  root → 404 → broken brand logo (visible in console errors on the
  hosted demo).

- src/bareforge/export/cljs_project.cljs: the index.html the CLJS
  export plugin emits hard-coded <script src="/js/main.js">. Same
  bug shape — users hosting their exported project at a sub-path
  would see a 404. Made relative to match the new convention.

The lingering <feGaussianBlur stdDeviation="var(--x-welcome-...">
warning in the console is upstream in BareDOM 2.4.0's
x-welcome-tour SVG markup (CSS variable bound to a numeric SVG
attribute that doesn't accept var()). SVG falls back to default
blur; cosmetic console noise, not a broken UI. Will file upstream.

All four gates green locally.
@avanelsas avanelsas merged commit 9c57b76 into main Apr 27, 2026
1 check passed
@avanelsas avanelsas deleted the feature/relative-toolbar-assets branch April 30, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant