piratar / wasa2il

Direct democracy system
https://x.piratar.is
Other
28 stars 16 forks source link

#93 Breadcrumbs for easier navigation in polities #150

Closed baldurjonsson closed 7 years ago

baldurjonsson commented 8 years ago

Hey! Here's my implementation of a crumtail to make it more obvious for the user where he is and what he's viewing. Discussed on issue #93

Simple to add to views or change.

Pictures, thousand words and all that :) image

image

image

baldurjonsson commented 7 years ago

@7oi hi new guy! Have you taken a look at this?

7oi commented 7 years ago

tl;dr @baldurjonsson I'm a fan of breadcrumbs, for sure. These look nice, although I'm more for seeing less work in templates, more in views. But this is a great start and improve navigation a lot.

Long version I would've liked to see more of the work done in the views, rather than in the templates. It would be really nice to only have to include the breadcrumb template in the base template, having the breadcrumbs added to the context in the view (a helper function would work nicely there) and therefor automagically added to any page. I'm personally a fan of templates being generic and as reusable as possible. I would always look for the definition of the breadcrumbs in the view, not in the templates.

That being said, there are templates in wasa2il that could be way better, so there will have to be a cleanup one day. But all that would need to come along with a redesign of the UI/UX (which I believe is planned sometime in the future).

7oi commented 7 years ago

...and if it wasn't clear, I plan on merging this after reviewing it locally. It can be refactored later, but this enhances the UX enough to warrant merging as is.

viktorsmari commented 7 years ago

Agree with @7oi, is it not possible to add this to the base or a 'top view', instead of adding it manually to every page needing this?

7oi commented 7 years ago

As I said, that will come later. For now, this is a nice addition waiting eagerly for a proper refactor. Most of the elements will be useable in any case. Just the templates will be changed and the add_breadcrumbs method can be reformed from a tag to a helper method to use in the views for making the breadcrumbs.

I can taste the refactor.