jupyterlab / jupyterlab-metadata-service

Linked data exploration in JupyterLab.
BSD 3-Clause "New" or "Revised" License
29 stars 16 forks source link

Change linked data providers to return thunks #37

Closed saulshanabrook closed 5 years ago

saulshanabrook commented 5 years ago

Previously, the linked data providers would return either the data or null. However, this meant that determining whether a url had any linked data about it was async.

This commit changes it to return either null or an async thunk. That way, we can determine if a URL has linked data about it synchronously, and so the "linked data" viewer will only show up for urls that actually have linked data, instead of all of them.

This improves the UI when selecting a parent dataset, that has no linked data. Previously, the data browser would show an empty linked data viewer for it. Now, it will not and instead look at its children for linked data.

Screen Shot 2019-10-04 at 11 04 06 PM