-
Notifications
You must be signed in to change notification settings - Fork 85
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
[CODE] Add "Gender" Filter #114
Comments
Hi @billimarie, I'd like to help with this 🙂 I'm not super familiar with meteor (I'm more a react/typescript dev), but I've had a look around the codebase and it doesn't look like rocket science, so I think I can figure it out! If I'm on a roll, I could also add some of the other filters too, since the code should be very similar for each of them. |
Hi @Zoe7, thanks for volunteering. We'd love to have your contributions. If you're familiar with React, I believe you will catch the gist of Meteor after you play around for a bit. Feel free to tackle the other issues if you're able! Good luck & let me know if you run into any issues setting up. |
Thanks, I got the project up and running yesterday evening so I'll get to coding today.
I thought a little bit about it last night and I think you'd be better served with checkboxes (in most of the filtering cases). Radio buttons are awkward for this since they normally should be pre-filled and you're can't unselect them, so you'd have to add an "any" option. IMO the filtering would be more flexible if they are checkboxes that start unchecked and then you can pick male, female or both (or some other genders if you want to include those).
It's probably a little more work code-wise but it's a nice experience as a user trying to filter through stuff. I tried to find an example of some English website that has something similar so you could visualise what I'm talking about but I couldn't really. It's a really common pattern to use on websites selling appliances here in Denmark, so pardon the danish but this should still be somewhat understandable: https://www.power.dk/hus-og-fritid/stoevsugning/alle-stoevsugere/pl-5144/ (they let you filter by brand, inventory status, price and warehouses). I have another question regarding where you'd put the filters. Right now the role filter is at the top of the list, but it's going to end up taking a lot of space if all of them are added there. The mockup you had made was also very vertical, so I'm starting to think that you'd maybe want the filters on the side, as a side navigation kind of thing? (if so, it could be nice to do that first and create some kind of filtering feature branch so that everyone else working on filters doesn't start doing the same thing multiple times). And lastly, I wanted to ask you about the database schema and whether you already have the gender in there? I found this schema definition which I can also see is used from the server, but it doesn't contain any genders. So is it something you have collected so far but just not exposed? If so, in what format should I expect the data? (otherwise, I can come up with something). Sorry for the rant 😄 |
Sorry, me again! I have been digging into the code some more, and the role filter is implemented in a somewhat funky way right now. There is a filter helper in the template, but the way it's being displayed is through rendering all 5 possible lists in tab-panes and then using bootstrap to control what tab-pane is being shown to the user. The way that's implemented really won't allow scaling other kinds of filters easily, since we'd have to start creating combinations of all the different filters that can possibly exist. So IMO the role filtering should be refactored before we can add any of the other filters. (I can easily work on that, but it makes me a little worried about how all the other filters can/will be implemented 😅) |
I made a small PR to try to improve the role filter code so that we can start expanding upon it with other filters: #125 |
Wonderful brainstorming, @Zoe7! Thank you for sharing your thinking, curiosity, & mindfulness.
You're right about the checkboxes. The link you provided is a nice example. We are guided by the patterns shown in the data--once a prosecutor who thinks outside of the current binary is elected/appointed, we can put it in. Until then, it will just be filtering empty (but relevant) data.
This is a great question which I still am undecided on. I think of websites like Zillow.com which utilize a main horizontal filter & the option for vertical submenus when the user clicks/hovers on it. Then I also think of websites like Craigslist.com which purely utilize a vertical side filter, with the option to search at the top. I am not attached to one way or the other; but I believe the most responsive version is the one we should go with to compensate for mobile users. I'd love if you took a look at the Design issue (#105), where we are collaborating on new mock-ups in Figma. If you'd like access to the design, please feel free to send me your email (my email is in my profile) & I'll send you an invitation.
Precisely. You can see the JSON for (most) of the data we're collecting here: JSON Structure
This is absolutely welcomed! Thank you for taking the initiative. You're right about the code for the filter, it can and must be simplified. I truly appreciate you taking time to do so. I will checkout your PR within the hour. Tak! |
Hey, @billimarie I would like to contribute, can you assign me this issue? |
Background: please see #58 for a roadmap of the Additional Filters request.
We currently have a basic filtering system for filtering through prosecutors by role.
This feature request is for implementing an additional filter, which filters based upon a prosecutor's gender.
Ideally, this would be rendered as radio button choices. If you would like to take on this issue, please leave a comment.
The text was updated successfully, but these errors were encountered: