Git Product home page Git Product logo

yasgui.yasqe-deprecated's People

Contributors

alexeymz avatar bjonnh avatar dwvisser avatar esjewett avatar gerwinbosch avatar heyarne avatar jiemakel avatar jindrichmynarz avatar kinow avatar l00mi avatar laurensrietveld avatar maximelefrancois86 avatar mistermboy avatar relu91 avatar rubensworks avatar wouterbeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yasgui.yasqe-deprecated's Issues

Add prefix handlers

Functions:

  • addPrefix
  • removePrefix
  • setPrefixes
  • getPrefixes (already there, but uses simple string operations, where it should use cm+grammar)

This is useful in interfaces where prefixes are toggeable

Error in strict mode

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.

Properly align source maps

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)

Suggestion for variable insertion via VALUES (poor man's sparql templating ...)

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?

Change sparql grammar for SparqlJs

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

Just show the results ...

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

Improve documentation

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.

Refactor main.js

The main.js is too messy:
includes for

  • Prefix functions
  • Default settings
  • utils
  • autocompletion properties

And:

  • Variables of yasqe and cm are stored in same object. Dangerous: risk of collisions between both.
    Instead, use yasqe object, and store CodeMirror and cm as value in that object

Push this as major new version though, as it might break currently deployed YASQE instances

Show a busy indicator on the visible part of the screen

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.

Dynamic Accept headers

Add something like a 'preferredSelectContentType' and 'preferredConstructContentType', and choose these depending on the query type

File weight

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

Re-position buttons on copy/past

Repositioning only occurs on regular query editors, not on copy past.
As a result, the scrollbar may hover over the query button

Support requirejs for dependecy-less bundle

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

Improve download info on main page

  • Download options:
    • Href to files in gh-pages dir (minified/minified+map/normal vs completebundle/yasqe+jquery/yasqe+cm/yasqe
    • CDN link
    • github

Support autocompleting <

Autocompletion for non-prefixed URI requires at least 1 char. I.e., <h works, but < does not.
Make the latter work

Strange error for long running query

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).

http://goo.gl/a1we1K

(the URL shortener didn't work for the rather lengthy query).

acceptHeaderGraph apparently not working

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).

fix publishing of new version

proper order:

  • change package .json version
  • rebuild libs (version number is included in dist)
  • add tag with version number
  • commit
  • publish to npm

Change query button for invalid query

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)

Cannot reinitialise DataTable

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).

Resolve publishing issues

Publishing the lib via gulp does not work correctly:

  • npm and git get bumped to new version, but pushed lib is still one version behind (see #27). Probably due to the async nature of gulp.
  • while we are at it, also automatically do a version push to npm in each gulp task

Switch to jsdelivr

  • better stability (two CDN providers in 1)
  • Easier inclusion of two libraries
  • Downloading as packaged zip
  • Neat tricks with the semantic versioning

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.