imalsogreg / reffit

Community mini-reviews for scientific papers
reffit.com
GNU General Public License v3.0
33 stars 3 forks source link

Useability: Add Breadcrumb displaying the Currently selected Filter by Subfield Tag. #26

Open AnneTheAgile opened 10 years ago

AnneTheAgile commented 10 years ago

The left tree view updates only after typing carriage return (Firefox). So the workflow is ;

1.Click 'add' a topic to subset. 2.It shows up in the open text box. 3.Go to the text box and type carriage return. 4.Left treeview updates.

However, the refreshed view, though subsetted, leaves no breadcrumbs alerting the user to what was clicked.

AnneTheAgile commented 10 years ago

Hmm, I can't see how to change the tag from bug to feature.

AnneTheAgile commented 10 years ago

Possibly an easier first fix is to remove the 'link' styling from the non-link on the New Paper page, "Choose Tag".

imalsogreg commented 10 years ago

Ahhh, filter by subfield - yes this is a very broken part of the site. I like the breadcrumbs idea! Thanks will try to do soon

AnneTheAgile commented 10 years ago

I tried to figure out how to add them but I could not. Maybe you can give me pointers and/or suggest another ticket? I really want to send you a PR ! //AnneTheAgile

imalsogreg commented 10 years ago

Oh great, please do! The easiest way would be to put some parameters into the "/" route. So reffit.com/?filter=Biology.Zoology would load up the front page with papers tagged ( Biology.Zoology | Biology.Zoology.Ants | Biology.Zoology.Mollusks | etc. ). (Does this make sense? The idea is that a paper tag can be very specific, and filters work with an implicit * at the end (so a Biology search matches Biology and every sub-field of Biology).

Issue 1 is to parse the parameter out in the handler for the "/" route.

Issue 2 is to filter up the papers that match the query function in Reffit.FieldTag to help with this : )

Issue 3 is rendering those breadcrumbs. Given that we already pulled the filter term out of the URL, writing the splice shouldn't be too hard. With xmlhtml, and a TagPath, we can make a top level html element to hold the entire breadcrumbs,

the children of that element can be alternating FieldTag and separator elements (using Data.List.intersperse, to intersperse breadcrumb separator markers with the breadcrumbs themselves).

The final touch would be linking each of the FieldTags in the breadcrumbs to the "/" route with a different TagPath, like so:

Home (link to filter="") (* separator) Biology (link to filter=Biology) (* separator) Zoology (link to filter=Biology.Zoology) (* separator) Mollusks (either no link, or link to "#")

Email me if you feel stuck!

AnneTheAgile commented 10 years ago

Super, thank you for the tips!