-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render WDQG-visualisations in page, instead of using iframes. #1411
Comments
I am working on this. (I tried to assign the issue to myself, – but do not have the permissions on the repo to do this yet). |
Status update: This is more complex than I hoped: the code in While I see if this is feasible, – I also streamline the way it is going to be embedded, – the plan is that sparql queries can be embedded in html like: <script type="sparql/wikidata-query-gui">
#defaultView:Graph
SELECT
?citing_work ?citing_workLabel ?rgb
?cited_work ?cited_workLabel
WITH {
SELECT (COUNT(*) AS ?count) ?citing_work WHERE {
[...]
</script> And then the script-tag will be replaced with the actual element when the document is loaded. The sparql-file wil just be included with a template like:
(none of this is ready yet) Work on the issue happens in this branch: https://github.com/rasmuserik/scholia/tree/1411-wdqg-in-page-not-iframe (currently the branch also includes some temporary development-code that will be removed before pull-requesting) |
Status update: We only get the raw visualisations, and not the entire wikidata-query-gui UI. If this is a problem, we need to find another way. I have also
The next step is to change the code from proof-of-concept to be actually usable/mergeable into production, and support/test with above types. |
"{"hide": ["?end_time", "?start_time"]}" are parameters that are available for some of the visualizations. I have checked http://127.0.0.1:8100/dev/Q21090025 and it looks fine. I hope that the final version would be able to display some for feedback while it is querying and an indication of empty if there is no graph. I am wondering whether the window size can be controled, e.g., to be made smaller if there is no results? |
It might be possible to use the code from wikidata-query-gui to render the visualisations directly in the page instead of including them as iframes. This could help with several existing issues, such as #1367, #1026, #1374, #394, #301, #5, #1246 etc.
The first step will be a proof-of-concept to determine whether it is feasible to use WDQG in this way. Then we probably need to make changes to WDQG, as well as changing the
{{ sparql_to_iframe(...) }}
within Scholia. Hopefully our changes to WDQG can also go upstream.The text was updated successfully, but these errors were encountered: