triply-dev / yasgui.yasqe-deprecated Goto Github PK
View Code? Open in Web Editor NEWDeprecated, see https://github.com/TriplyDB/Yasgui for the Yasgui monorepo
License: MIT License
Deprecated, see https://github.com/TriplyDB/Yasgui for the Yasgui monorepo
License: MIT License
Functions:
This is useful in interfaces where prefixes are toggeable
Hey, I'm using YASQE with application/xhtml+xml
media type (which enforces strict mode in browsers) and I get this JavaScript error:
SyntaxError: An invalid or illegal string was specified http://localhost:8080/graphity-client/static/js/yasqe.js Line 24133
I think this could be refactored in a XHTML-compliant way. Better to avoid .innerHTML
, but this entity reference could also be a problem.
The source maps are generated, but setting breakpoints in the source map does not. See whether we can properly align both. (need some trickery in the gulp-sourcemaps and browserify plugins)
Update queries should use 'update' url-query argument (not 'query'). See http://www.w3.org/TR/sparql11-protocol/#update-operation
Connected to #20.
Examples:
Thinking about what we discussed yesterday, and taking into account that general templating for sparql queries may be tricky, I wonder if the VALUES statement could be exploited for this.
VALUES could be used by the author of a query to define defaults values for queries, which are meant to be overridden by users of this query, for example:
...
FILTER ( lang(?label) = ?language )
...
VALUES ?language { "en" }
Perhaps, YASGE could support this, in offering a "Edit values" function, where for each VALUES parameter an editable field with the value is displayed, and the result is inserted into the query.
The more general case of the VALUES statement looks like this (http://www.w3.org/TR/sparql11-query/#inline-data):
VALUES (?x ?y) {
(:uri1 1)
(:uri2 UNDEF)
}
so parsing would a bit more difficult, and values would have to be given in a grid of editable fields.
The advantage of such an approach would be that the author of a query can designate "tweak here" spots. Other variables, which should be bound during the execution of the query, would not be exposed. Thus, the inner working is not disturbed, and the default values - hopefully in combination with the variable names - can provide hints for the users on what to fill in.
Of course, all of this can be achieved by custom coding - but it would make a nice and rather general feature too, wouldn't it?
Right now we use the (bloated) flint sparql grammer. Try using the one of Ruben (sparqlJs). Would need some tweaking though for iterative syntax checking
Hi Laurens,
I want to show query results to end users. For this purpose, I want (optionally, by url arg) to hide the query and the output selector. This should be easy (document.getElementById(yasqe).style.display = 'none' and yasr.drawOutputSelector: false), but due to my poor javascript knowledge I haven't yet figured out how to apply this syntactically. If you still are planing to provide gists for different usage scenarios, this could be a nice use case :-)
Cheers, Joachim
Scrap automatic generation. Does not improve readability of code (ironically), and how it is currently set up we get just as many typos as we would when we write the documentation manually.
Perhaps, in the future, when YASQE increases in size, use a js documentation generator which -analyzes- the code.
http://yasqe.yasgui.org/doc/ - where has ist gone?
Thanks to git, I have a local copy now - cheers, Joachim
Preferable, pointing to the individual files prior to the browserify step (if possible)
looks ugly: query disappears (partly) behind button. should either disappear fully, or hover over it, or ideally, make buttons partly transparent
Include it in this repo, with some documentation, and a simple build script. That should make it easier for people to extend the grammar used in yasqe (combine this issue with #54)
The main.js is too messy:
includes for
And:
Push this as major new version though, as it might break currently deployed YASQE instances
After updating from YASQE 2.2.4 example page to 2.2.5 same example page, formatting changes (different spacing of lines, settings such as "viewportMargin: Infinity" are ignored).
Supposedly related to Triply-Dev/YASGUI.YASR-deprecated#23
Because I have lengthy queries to edit, I use "viewportMargin: Infinity". Currently, when I edit such a query, I can execute it by ctrl-enter without scrolling back to the top of the yasqe window, but I get no indication when execution is finished - because the busy indicator spins on the upper right corner of window.
Would be nice to have another spinning wheel in the center of the visible portion of the yasqe window.
Reported in Sesame issue tracker SES-2184, BASE keyword usage described at http://www.w3.org/TR/sparql11-query/#relIRIs:
just allow the keyword BASE in yasqe editor.
The following works fine, but Yasqe doesn't agree (red warning).
BASE <http://myRoot/>
select ?x where
{ <myPackage1/myFinal> a ?x }
don't have lots of css, but it has some advantages nonetheless (e.g. namespacing)
e.g. executing the query using ctrl-enter.
Add something like a 'preferredSelectContentType' and 'preferredConstructContentType', and choose these depending on the query type
Hi,
We're embedding YASQE and YASR into the Palladio project (they should appear in the next version thanks to @jiemakel ). At the moment they are going to be our heaviest dependency. I haven't looked into it deeply enough to understand exactly why this is. I've had experience with Browserify embedding all dependencies in the bundle, so I wonder if that might be happening.
So, really 2 questions: Would you be open to a pull request to provide a distribution without dependencies? And, if you are open to that, do you have any ideas about where I should start?
Thanks!
Ethan
This must be a minifyer version issue: I did not have this problem before
Repositioning only occurs on regular query editors, not on copy past.
As a result, the scrollbar may hover over the query button
The dependency-less bundle shims the codemirror and jquery module references as globals.
This works fine in a setup where we have these as global variables, but it does not work when used in combination with require.js (which demands a require statement)
But: revert the global shimming, and the regular inclusion case where we use global vars does not work.
So, we need the best of both worlds. There is no browserify transform which does this, so make our own 'optionalShim' transform. This should first attempt a require, and if that fails, take the global variable
But: if e.g. 'query' already exists, overwrite that one
should work, so guess this is a bug
not supported (well, we do this for prefixes, but not in a way that is extensible)
What I mean by 'reference', is that instead of passing 'query=' as argument, use a 'ref=' argument, pointing to a url. This URL will contain the configuration for this particular query.
This is related to this older YASGUI issue: https://github.com/LaurensRietveld/yasgui/issues/225
SPARQL allows for Unicode codepoint escape sequences anywhere (http://www.w3.org/TR/sparql11-query/#grammar). Could YASQE at least allow them inside quoted literals.without marking the code as invalid? See, e.g., https://openrdf.atlassian.net/browse/SES-2172, for examples of valid SPARQL/Update getting highlighted as invalid in YASQE.
Autocompletion for non-prefixed URI requires at least 1 char. I.e., <h works, but < does not.
Make the latter work
This only occurs on change now, which causes glitch when query has lots of lines (more than height of yasqe) on load
Don't know how relevant this is, but just wanted to report:
I've a query which takes about 90 seconds. When I ran it on http://yasgui.laurensrietveld.nl/, the first time I got an 504 error. When I tried to repeat in Firebug, I got a response "exception: Lexical error at line 21, column 9. Encountered: " " (32), after : "VALUES"" by YasguiService, but only after the result from the endpoint has been returned (with obviously correct content).
(the URL shortener didn't work for the rather lengthy query).
I've tried a construct query with the default value of acceptHeaderGraph, and also setting explicitely
var yasqe = YASQE(document.getElementById("yasqe"), {
sparql: {
showQueryButton: true,
acceptHeaderGraph: "text/turtle,*/*;q=0.9"
},
consumeShareLink: consumeUrl
});
but it looks like "application/sparql-results+json" is requested (and my endpoint choses to return rdf/xml).
show tooltip on parse error, with more info
Did a clean clone and it looks like a dependency of the gulp-notify module has gone haywire. For the moment, I'm just removing gulp-notify and all notifications from the Gulpfile.
proper order:
Related to #52 - is it possible to jump to the yasr results, when a yasqe query has finished execution?
make the cross less prominant. This way, the user may realize that execution of the query is still a posibility, even though YASQE detects it as incorrect (might be useful for some virtuoso queries)
When I re-execute a query, I get an alert:
DataTables warning: table id=DataTables_Table_0 - Cannot reinitialise DataTable. For more information about this error, please see http://datatables.net/tn/3
Perhaps best thing would be to clear the table at start of page load/execution of yasqe. (Currently, without special precautions, the results from the previous query are displayed even if an error occured, .e.g. another query referenced by queryRef could not be loaded).
Publishing the lib via gulp does not work correctly:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.