Conversation
Minify sparql
Query library
Update link to the application.
Updated queries endpoint and accordion header color.
Minor CSS update.
Updated endpoint.
| "node-fetch": "^2.6.1" | ||
| "node-fetch": "^2.6.1", | ||
| "sparqljs": "^3.7.3", | ||
| "ted-sparql-editor": "file:" |
There was a problem hiding this comment.
This dependency is declared as 'file:', is that intended?
cristianvasquez
left a comment
There was a problem hiding this comment.
Minor improvements needed
-
Unused queries
Several query files undersrc/assets/queries/are not currently used by the application. Additionally,index.yamlonly references 4 of the 20 available queries. If these files are indeed unused, consider removing the entiresrc/assets/queries/directory to keep the repository clean. -
Application not running due to missing static file serving
The application does not currently start correctly because the CORS proxy server (src/js/cors-proxy.js) defines only a/proxyroute and does not serve static assets (HTML, CSS, JS).
To fix this, add the following line:// Serve static files from the project root app.use(express.static('.'));
-
Self-referential dependency in
package.json
The dependency entry"ted-sparql-editor": "file:"
is self-referential (the package name is also
ted-sparql-editor) and is not used anywhere in the codebase. It can be safely removed.
|
Superceeded by PR#25 |
Stage 6 already wired ?facet= URL loading via SearchPanel.init → controller.initFromUrlParams → controller.search. Stage 8 added editor reflection on user-initiated searches. This commit closes the gap by also reflecting the canned query into the editor when a facet is loaded from the URL — anyone landing on the merged app via a shared link sees the same editor + Explore state they would have seen if they'd typed the search themselves. The share button (added in PR #24, ported in Stage 3) already emits ?facet=...-shaped URLs with the same identity-only stripping, so the round-trip is symmetric: Click share on Explore tab → ?facet=%7B%22type%22%3A%22notice-number%22%2C%22value%22%3A%2200172531-2026%22%7D Open in new tab → URL parsed, facet validated, search runs, lands on Explore → Title: "Notice 00172531-2026 — 244 triples" → Search input mirrored → Editor pre-filled with the canned CONSTRUCT → Tree rendered Implementation: src/js/SearchPanel.js init() — after the existing notice-number input mirroring, also wraps a try/catch around getQuery(facet) and calls this.loadEditorText() so the editor reflection applies to all facet types (notice-number, named-node, query) loaded from URL. Verification: - npm test: 139/139 passing - Navigate to ?facet=%7B%22type%22%3A%22notice-number%22%2C%22value%22%3A%2200172531-2026%22%7D - Auto-switches to Explore tab (Stage 6 behaviour preserved) - Title: "Notice 00172531-2026 — 244 triples" (notice-number semantics preserved via the existing controller.search call inside initFromUrlParams) - Search input shows "00172531-2026" - Query Editor tab shows the canned CONSTRUCT pre-filled - Click share → 103-char URL identical in shape to the input URL
For deployment. Includes the following changes: