Skip to content
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

Add Id's to Iframe widgets generating content from Wikidata SparqlEndPoint #1093

Open
nunogit opened this issue Mar 30, 2020 · 2 comments
Open
Labels
documentation hopefully helpful explanations of how things work HTML things related to the HTML parts of Scholia panels screen space for displaying the result of a query SPARQL the way Scholia queries Wikidata tools+workflows about ways in which Scholia integrates with WikiCite curation workflows
Milestone

Comments

@nunogit
Copy link

nunogit commented Mar 30, 2020

Adding Id's to Iframes woild be important to target specific tests to these widgets.
Adding a consistent class across all SPARQLEndpoint Iframes could be a bonus.

Eg:

`

<iframe id="Organizations" class="embed-responsive-item sparqlWidget" src="https://query.wikidata.org/embed.html#%23defaultView%3ALineChart%0ASELECT%20%3Fyear%20%28COUNT%28%3Fwork%29%20AS%20%3Fnumber_of_works%29%20%3Forganization%20%3ForganizationLabel%20%20%0AWHERE%20%7B%0A%20%20%7B%0A%20%20%20%20SELECT%20DISTINCT%20%3Fyear%20%3Fwork%20%3Forganization%20WHERE%20%7B%0A%20%20%20%20%20%20hint%3AQuery%20hint%3Aoptimizer%20%22None%22.%0A%20%20%20%20%20%20VALUES%20%3Forganization%20%7B%20%20 wd:Q1269766 wd:Q193196 %20%20%7D%0A%20%20%20%20%20%20%3Fauthor%20wdt%3AP108%20%7C%20wdt%3AP463%20%7C%20%28wdt%3AP1416%2Fwdt%3AP361%2a%29%20%3Forganization%20.%20%0A%20%20%20%20%20%20%3Fwork%20wdt%3AP50%20%3Fauthor%20.%0A%20%20%20%20%20%20%3Fwork%20wdt%3AP577%20%3Fpublication_date%20.%0A%20%20%20%20%20%20BIND%28STR%28YEAR%28%3Fpublication_date%29%29%20AS%20%3Fyear%29%0A%20%20%20%20%7D%0A%20%20%20%20GROUP%20BY%20%3Fwork%20%3Fyear%20%3Forganization%0A%20%20%7D%20%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22.%20%7D%0A%7D%0AGROUP%20BY%20%3Fyear%20%3Forganization%20%3ForganizationLabel%0AORDER%20BY%20%3Fyear%0A%20"></iframe> `
@Daniel-Mietchen
Copy link
Member

Makes sense. Do you have recommendations for how to go about the class?

@nunogit
Copy link
Author

nunogit commented Apr 1, 2020

@Daniel-Mietchen, for now, I will just find all iframes.
Currently, most iframes are widgets from the SPARQL endpoint, but still, this is a bit brute force solution. I will have to "hack" a bit around to check what type of content it contains.
This solution is not fundamentally wrong, but it's not as clean as it could be either.

@Daniel-Mietchen Daniel-Mietchen added the documentation hopefully helpful explanations of how things work label Nov 5, 2020
@Daniel-Mietchen Daniel-Mietchen added the tools+workflows about ways in which Scholia integrates with WikiCite curation workflows label Nov 5, 2020
@Daniel-Mietchen Daniel-Mietchen added HTML things related to the HTML parts of Scholia SPARQL the way Scholia queries Wikidata panels screen space for displaying the result of a query labels Nov 5, 2020
@egonw egonw modified the milestones: 31 May 2021, 30 June 2021 Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation hopefully helpful explanations of how things work HTML things related to the HTML parts of Scholia panels screen space for displaying the result of a query SPARQL the way Scholia queries Wikidata tools+workflows about ways in which Scholia integrates with WikiCite curation workflows
Projects
Development

No branches or pull requests

3 participants