ckan/ckanext-showcase

Adding a showcase-type field?

bellisk opened this issue · 0 comments

I'm using ckanext-showcase for a project where the client wants to add two fields to filter showcases by: type (e.g. blog post, app, news item), and topic (e.g. health, climate, etc.). Currently, showcases only have a field for free-form tags.

I thought I could add the extra fields by using the IDatasetForm interface, but found out that it's only possible for there to be one IDatasetForm plugin per dataset type, and of course the ShowcasePlugin is already using it for showcases. I then tried adding the type and topic values to the tags field and using helper functions to handle them correctly, but ran into other issues there.

Arguably, topic can be handled with the existing tag field. I think a showcase_type field would be generally useful for the users of ckanext-showcase, though. Would there be interest in adding it? (I've called it showcase_type because there is already a type field on the showcase model, denoting the type of dataset.)

For the time being, I am going to fork this repo and add the showcase_type field with the values suggested by my client (see below). I'm very happy to discuss different options for those values if the maintainers here are interested in accepting a patch.

  • Application
  • Data visualisation
  • Event
  • Blog and media articles
  • Paper