Coder Social home page Coder Social logo

ckan-embed's People

Contributors

dependabot[bot] avatar loleg avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

datalets ro6ley

ckan-embed's Issues

Support for images

Currently no images are displayed in the embedding plugin. This could include the logo of the portal, license icons, and institution images - these have all been requested by users. I don't yet know if there's a standard way to extract this from CKAN.

Institution details

Currently the list of datasets output is by default roughly equivalent to the way it is presented in the portal. A user of the embed plugin in the OpenGLAM community asks:

Wouldn’t it be better to indicate the data providing institution instead of the thematic area in the list of datasets pulled from opendata.swiss? Also, I would suggest sorting the datasets on the institution name.

While it is now possible to use a template to change the output formatting, custom sorting requires an additional option in the plugin.

Multilingual support

Some CKAN portals like opendata.swiss are multilingual, and if you want to target a specific language, I've added a wiki page explaining how to do that. However, if you want that users can switch languages interactively, or even combine results from multiple languages, it might be worth thinking about an explicit option in the widget. For this, I would need to dig into the way language support has evolved over the last couple of years, and if there's a standard way to select languages in the API.

Inline previews or downloads

Currently the widget just shows links to the source portal, where users need to navigate themselves to a download or preview. We could at least suggest how a direct download button could be embedded in the template - or a preview potentially integrated using Recline or similar.

Embedding as an image

Design and implement the ability to embed datasets or even search results in the form of an image, performing the output rendering server side. An SVG is probably the easier format, with a library like SVG.js or Python's svgwrite. This will make more sense in a dedicated project if we cannot reuse the code here.

screenshot_20181212-225040 2

A sketch of three possible views (full size/ popup mode, badge, sparkline) has been made at https://wireframe.cc/d7Ipo6

Justification: several potential users have been blocked from implementing this widget by CMS restrictions. Plus, it is clear that for some sites the external scripts - even when CDN'ed - pose a potential performance or security risk. And IFRAMEs are less desirable for accessibility reasons.

Automatic link enhancement

While the current widget is relatively easy to get started it, the idea of having to put div tags and other HTML somewhere in their content is rather daunting for users. I have been thinking that a better way to go would be to just include the script in the CMS, and then pick up plain search links in the page content as targets for the widget. Perhaps they would need to be suffixed with #ckanembed or so, but this would dramatically improve the user experience. And it would truly take advantage of having an in-line widget, rather than the safer alternative of an IFRAME or so. We could also then consider creating an additional mode for decorating links to specific datasets (e.g. on hover).

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.