Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

UI Components #28

Closed
7 of 10 tasks
saulshanabrook opened this issue Aug 9, 2019 · 2 comments
Closed
7 of 10 tasks

UI Components #28

saulshanabrook opened this issue Aug 9, 2019 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@saulshanabrook
Copy link
Member

saulshanabrook commented Aug 9, 2019

  • Factor out CSS into separate files
  • Switch to JupyterLab color CSS variables
  • Add basic padding
  • Different color or styling for links
  • Add back button (Add back button to active explorer jupyterlab-data-explorer#101)
  • different style for literals then for properties
  • Make @type also links
  • Make any values that are URLs be external links, style them differently then internal links
  • Add padding
  • Don't expand JSON LD, to preserve context, and show context as well
@saulshanabrook saulshanabrook added this to the 3.0.0 milestone Oct 14, 2019
@saulshanabrook saulshanabrook added the enhancement New feature or request label Oct 14, 2019
@saulshanabrook
Copy link
Member Author

saulshanabrook commented Oct 16, 2019

We have decided we don't wanna flatten the JSON LD so we can preserve the context and use show the unexpanded properties for better UI.

If we are going to not flatten the JSON LD document, maybe it would be good to have a more accurate represenation of what is allowed in JSON LD and what is not.

Then we can start to query over JSON LD, to get the things we need like "A list of all properties." But before we can even get there we should probably type the structure.

Is there a JSON Schema for JSON LD?

Yes?

But it hasn't been updated in a while.

SHACL-AF?

@millercl said that

Having jsonld reformat a document (compact, flatten, etc.) will expose whether it is valid JSON-LD or not. Would rather see SHACL-AF implemented in JavaScript.

So maybe SHACL-AF is a useful library or standard to represent JSON LD?

SHACL looks useful in that it can define "shapes" that you can say your JSON LD has to conform to: https://shacl.org/playground/ But the JS library just seems to be used for validating: https://github.com/TopQuadrant/shacl-js

I don't wanna validate, I wanna say "Here is a big JSON LD graph, pull out entities with this ID, and combine it with these other graphs who also have entities with this ID. Then show me all properties about this ID, without expanding them, and show me the expanded version, so I can put that on hover"

RDF

So it looks like this rdfjs dataset library is the correct way to form a collection of rdf quads and filter them for a certain predicate.

There is also this nice library by @rubensworks which can parse JSON LD contexts and use them to compact IRIs.

So the logic could go something like this:

  1. Hit each of my linked data registries for a URL. They should each return JSON LD.
  2. For each of these, parse them as RDF and create a RDF dataset that contains all entities. Also combine all contexts using json-ld context parser.
  3. Filter the dataset based on the @id we care about
  4. Pass the filtered dataset to the react component to view, along with the context. group by the predicate and compact it with the context.

@saulshanabrook
Copy link
Member Author

Consumption of the RDF Data Model in OOP/JavaScript can be avoided.

What do you mean that it can be avoided? We are building a UI to explore linked data in the browser, so that's why we need to understand the data model in the browser.

@saulshanabrook saulshanabrook modified the milestones: 3.0.0, Future, 4.0.9 Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants