openwisp / openwisp/netjsongraph.js

[bug] Fix missing legacy iconfont assets referenced by netjsongraph.css

Open Beginner friendly
#616 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
314
Forks
119
Avg merge
18h 17m
Merged PRs (30d)
15

Description

Describe the bug

src/css/netjsongraph.css defines an @font-face rule that references external legacy iconfont assets:

  • iconfont.eot
  • iconfont.woff
  • iconfont.ttf
  • iconfont.svg

None of these files are tracked in the repository or included in the generated dist/ output. The rule also includes an inline base64 WOFF2 font, so modern browsers render the icon correctly without requesting the missing files.

However, this breaks Django deployments using manifest static storage, including OpenWISP's CompressStaticFilesStorage. During collectstatic, Django resolves every CSS url() reference and fails because the external font files do not exist:

ValueError: The file 'netjsongraph/css/src/iconfont.eot' could not be found with <openwisp_utils.storage.CompressStaticFilesStorage ...>

Steps To Reproduce

  1. Install or package netjsongraph.js for use in a Django deployment with manifest static storage.
  2. Run collectstatic with OpenWISP's CompressStaticFilesStorage (or another storage backend that resolves CSS asset references).
  3. Observe that processing netjsongraph.css fails when Django attempts to resolve the missing iconfont.eot reference.

Expected behavior

The distributed stylesheet should not reference assets that are absent from the package. The @font-face declaration should retain the embedded WOFF2 data URI while removing the unavailable EOT, WOFF, TTF, and SVG fallback URLs.

The generated dist/ output should be rebuilt after the source change.

Screenshots

Not applicable.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/css/netjsongraph.css and inspect the @font-face declaration referencing the missing iconfont assets. Retain the embedded WOFF2 data URI while removing the unavailable EOT, WOFF, TTF, and SVG URLs, then rebuild the generated dist/ output. Confirm the distributed stylesheet no longer references absent files and can be processed by manifest static storage.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.