discoverdotnet icon indicating copy to clipboard operation
discoverdotnet copied to clipboard

Add Filters/Sort to URL when changing them

Open nemec opened this issue 6 years ago • 3 comments

Update the URL to include any filters or sorts applied when browsing projects. It would be nice to be able to link someone directly to, for example, the CLI tag if you need a new library for a CLI parser.

e.g.

https://discoverdot.net/projects/?tags=CLI,PDF

nemec avatar May 22 '18 17:05 nemec

This is actually supported now, it's just not documented anywhere and the URL doesn't update on the fly. You can use the query string filter-filtername to turn on a filter and pass it comma separated values if it's a filter with multiple options like tags. I.e., https://discoverdot.net/projects/?filter-tags=compiler. One thing to note is that the filter-filtername is all lower case and without spaces or special characters whereas the filter values are as-in - I.e., https://discoverdot.net/projects/?filter-netfoundation and https://discoverdot.net/projects/?filter-tags=Data%20Access

daveaglick avatar May 22 '18 18:05 daveaglick

You know, as I was writing this I thought to myself "I'll bet it's already done and I'll look like a fool when my sample link actually works as expected." I was just a little off, so only a slight fool :)

nemec avatar May 22 '18 18:05 nemec

Going to leave this open as an enhancement to update the URL when changing sort/filter from the UI.

daveaglick avatar May 24 '18 15:05 daveaglick