CodeForPhilly / clean-and-green-philly

Dashboard to target Philly vacant properties for anti-gun violence interventions
https://www.cleanandgreenphilly.org/
MIT License
26 stars 51 forks source link

Reword Filters #592

Open thansidwell opened 2 months ago

thansidwell commented 2 months ago

Reword these filters

Image

Image

Image

zheyichn commented 3 weeks ago

Hi! May I be assigned this issue?

zheyichn commented 3 weeks ago

I have updated the filter option content (draft PR), but the filtering is malfunctioning. Any thought @CodeWritingCow?

https://github.com/CodeForPhilly/clean-and-green-philly/assets/88219993/894250b5-15ab-499f-8f1e-b07620a63365

CodeWritingCow commented 3 weeks ago

@zheyichn great catch! It seems if we rename the options Yes/No to Business/Individual, then our filtering UI returns zero results. As a comparison, here's a screen recording of our current UI with the Yes/No options for "Owner." Note how it returns filtered results as expected:

https://github.com/CodeForPhilly/clean-and-green-philly/assets/7751862/4ee5e0b5-3c84-41f5-9ab9-c8e6803b5520

I see at least two different ways to resolve this:

  1. Modify the Python pipeline as your draft PR is doing. However, I'm not sure how this would alter our data. Before continuing with this approach, it's best if you discuss it first with @nlebovits, @brandonfcohen1 or @zigouras. They are more knowledgeable about the data pipeline.
  2. Don't modify the Python scripts. Keep the Yes/No option values "under the hood" but display their text in the UI as Business/Individual "on the surface."

What do you think?

zheyichn commented 3 weeks ago

Hi @CodeWritingCow, thanks for your inputs! I think option2 is easier at this moment and we can always come back to refactor the script later if needed. I have made some changes accordingly to adpat display flexibility here. Can you review it when you get a second?

If option1 is preferred, I am happy to dig more into the backend.

CodeWritingCow commented 3 weeks ago

Hi @zheyichn, I've reviewed and approved your PR. Your solution allows front-end developers to be flexible with button text, so they don't have to be concerned with the backend. Thanks for looking into this!