Skip to content

gdsa 1733 neo4j viz graphwidget not rendering in graph analytics - #467

Merged
FlorentinD merged 3 commits into
mainfrom
gdsa-1733-neo4j-viz-graphwidget-not-rendering-in-graph-analytics
Oct 9, 2026
Merged

FlorentinD merged 3 commits into
mainfrom
gdsa-1733-neo4j-viz-graphwidget-not-rendering-in-graph-analytics

Conversation

@FlorentinD

Copy link
Copy Markdown
Collaborator
  • Reduce GraphWidget payload by sourcing the NDL stylesheet from the model
  • Fix GraphWidget loading in hosts that load an AMD loader (PyCharm, VS Code)
  • Add changelog entries for the widget payload reduction and PyCharm/VS Code fix

The NDL stylesheet was bundled into the ESM (twice) and shipped again as _css, so every widget display carried ~6 MB of the same CSS. Read it from the model's _css trait instead (anywidget syncs it; Streamlit seeds it) and drop the dead NVL layout worker chunks from the build output.

widget.js 7.3 MB -> 3.2 MB, index.html 8.5 MB -> 4.4 MB, streamlit graph.js 7.3 MB -> 5.2 MB.
… Code)

Transitive UMD deps in the bundle (lodash, classnames, layout-base, cose-base, cose-bilkent, RBush) call the AMD define() when a loader is present. PyCharm/VS Code pages load requirejs, so evaluating the widget module raised 'Mismatched anonymous define() module', aborting it and tripping anywidget's 2s init timeout ('Failed to initialize model').

Neutralize the AMD branch at build time via define.amd = undefined.
@FlorentinD
FlorentinD force-pushed the gdsa-1733-neo4j-viz-graphwidget-not-rendering-in-graph-analytics branch from 8c90b4e to ab43910 Compare October 9, 2026 13:58
@FlorentinD
FlorentinD marked this pull request as ready for review October 9, 2026 14:02
@FlorentinD
FlorentinD merged commit 4045f67 into main Oct 9, 2026
16 checks passed
@FlorentinD
FlorentinD deleted the gdsa-1733-neo4j-viz-graphwidget-not-rendering-in-graph-analytics branch October 9, 2026 14:02
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