fix(frontend): load D3.js from jsdelivr instead of d3js.org - #177
Open
benoitcayladbx wants to merge 1 commit into
Open
benoitcayladbx wants to merge 1 commit into
benoitcayladbx wants to merge 1 commit into
Conversation
query-ontology-viewer.js, query-sigmagraph.js, registry.js, _ontology_map.html and _mapping_design.html all load D3.js from https://d3js.org/d3.v7.min.js. In networks where d3js.org is blocked — common in corporate environments with restricted outbound access, as is typical for Databricks Apps — every D3-based visualization these files power (ontology viewer, query result graph, Registry bridges map, mapping designer map) fails to load at all. Switching to https://cdn.jsdelivr.net/npm/d3@7/dist/d3.min.js resolves this in those environments. ontology-swrl.js gets the same change as part of the companion Designer-UI PR, since it also needed unrelated fixes there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reopened against
0.9.0afterdevelopwas deleted. GitHub cannot reopen #149 (closed PR + missing base), so this is a successor of #149 with the same commits. Original author: @jeremiaspf. Please rebase onto current0.9.0before review — expect conflicts.What
Switches D3.js from
https://d3js.org/d3.v7.min.jstohttps://cdn.jsdelivr.net/npm/d3@7/dist/d3.min.jsin every file that loads it:src/front/static/query/js/query-ontology-viewer.js(Query → Ontology Viewer)src/front/static/query/js/query-sigmagraph.js(query result graph, Sigma.js)src/front/static/registry/js/registry.js(Registry bridges map)src/front/templates/partials/ontology/_ontology_map.html(ontology map template)src/front/templates/partials/mapping/_mapping_design.html(Mapping designer panel template)(
src/front/static/ontology/js/ontology-swrl.jsgets the same change as part of the companion Designer-UI PR, since that file needed unrelated fixes too.)Why
d3js.orgis blocked in networks with restricted outbound access — which is common for Databricks Apps deployed in corporate environments. When that happens, every D3-based visualization fails to load entirely: the SWRL rule graph, the ontology viewer, the query result graph, the Registry bridges map, and the Mapping designer map. jsDelivr resolves cleanly in those environments and serves the same D3 v7 build.How to test
In an environment where
d3js.orgis blocked (or simulate by blocking it at the OS/proxy level), open any of the five screens above — they should render their D3 visualization instead of failing silently.