Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add more dataset filters similar to Categories and Organizations #155

Closed
stevenvandervalk opened this issue Jun 24, 2019 · 4 comments

Comments

@stevenvandervalk
Copy link

stevenvandervalk commented Jun 24, 2019

Hi Tim

Thanks so much for the project! It perfectly fits a use case we have for an open data document repository.

I am trying to add a few more filters but can't seem to get the javascript to populate the filter list.

I saw your description of how it might be done at

#136

but couldn't quite manage it in

https://github.com/stevevandervalk/jkan/commit/cdef1cc2b4bf4815470c482a7929458a0010f022

Any idea what might be missing? Any help would be greatly appreciated :)

@timwis
Copy link
Owner

timwis commented Jun 24, 2019

Hi @stevenvandervalk, glad to hear it! And I'm happy to help. Can you elaborate a bit on what you're trying to add? I think the issue you referenced talks about the ability to filter by multiple categories at the same time, but it sounds like you want to add additional filters (such as "license type" or something). Is that right?

EDIT: Nevermind - I wrote that before looking at your referenced commit! Taking a look now..

@timwis
Copy link
Owner

timwis commented Jun 24, 2019

Looks like you've got it mostly working.

Screenshot 2019-06-24 at 09 46 22

The only issue I can see is when you select a decade, it sets the others to 0, which isn't terrible but that doesn't seem to happen in the other filter lists.

Screenshot 2019-06-24 at 09 46 29

If it's not populating for you, I think you're not running the npm commands (see the architecture page in the wiki.

@stevenvandervalk
Copy link
Author

Thanks @timwis for the quick reply.

You were right, about both the original issue and I wasn't running the npm commands, not sure how I forgot about that!

I'll be creating a bunch of similar filters and documenting the process, is it of any help to jkan contribute such a page to the wiki? No worries if not.

Thanks again!

@timwis
Copy link
Owner

timwis commented Jun 24, 2019

Sure @stevenvandervalk that would be great. Another thing to consider, since your decades-filter.js code is very similar to the organizations-filter.js code, is perhaps we should make a generic filter-panel.js component?

Regardless, adding a page to the wiki would be a valuable contribution, and worth doing first either way!

I'll close this for now, but feel free to re-open if you run into further issues.

@timwis timwis closed this as completed Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants