Skip to content
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

Categories POC #608

Closed
wants to merge 35 commits into from
Closed

Categories POC #608

wants to merge 35 commits into from

Conversation

wbazant
Copy link
Collaborator

@wbazant wbazant commented Nov 19, 2024

For #383

Things I like about this implementation:

  • lets you discover the 'Freegan' types, and maybe the 'Honeybee' types are a bit interesting
  • works with some logic ( toggling a category includes it on both map and types menu)
  • lets us assess the quality of annotation and maybe improve it
  • works with the default choice of 'Forager + Freegan on first render'

I don't like the tags UI, or any other UI I tried, including a multi-select and a list of checkboxes.

Let's not merge this branch - e.g. the On The Map checkbox is not working now - but maybe it will be useful for figuring out what a better solution will look like.

…ries are only visible if at least one of their categories is checked. For disabled parents follow same logic as searchValue
…e if at least one of their categories is checked. For disabled parents follow same logic as searchValue
… which applies only to types without any categories. It should have a checkbox, state in redux, and influence on select tree
…to types without any categories. It should have a checkbox, state in redux, and influence on select tree
…play. The logic for leaf nodes and parents treated as leaf nodes to indicate nonspecific annotation should be as currently - if type includes one or more categories, it's in - but for parents that are there for tree structure, use children's match: all children matching category means include enabled, only some children matching category means include disabled
…hen a parent matches a category but child doesn't
…abledCategories, and log out the result - we'll use it in a second
…rTreeNode. Then don't return null, but instead set isVisible to false.
…t return null, but instead set isVisible to false.
…pes so that only types for currently selected categories are passed into selectParams
… depend on categories, make sure we refetch after category checkboxes are interacted with
…s, make sure we refetch after category checkboxes are interacted with
… reset. Solve it by defining categoriesChanged and using that in Filter.js
@wbazant wbazant closed this Nov 19, 2024
@ezwelty
Copy link
Collaborator

ezwelty commented Nov 19, 2024

@wbazant Well, don't be so hard on yourself 😉; this is pretty exciting. Took it for a spin and here were my initial ideas:

  • Do not call /locations when category filter changes (only when type selection changes)
  • Use lowercase
  • Begin category list with an all with one of the following behaviors:
    • If clicked, selects itself and deselects all others. If clicked again, deselects itself and selects all others. If other tag is clicked when it is selected, it is deselected (see https://hutmap.com/map shelter type filter).
    • If clicked, selects itself and all others. If clicked again, deselects itself and all others. If any other is deselected, it is also deselected.
  • Rename no category to other
  • Rename Type input to Search by name
  • Make the category tags more compact
  • Group together the category tags, Search by name, and On the map as search controls distinct from the Select all / Deselect all selection controls.

I fiddled around, including reducing On the map to an icon to the right of Search by name: https://jsfiddle.net/5ajpzfsw/5

What do you think?

@wbazant
Copy link
Collaborator Author

wbazant commented Nov 21, 2024

All right, I was being hard on the feature actually ;). Thanks for the suggestions, making tags square helps with the UI and the 'All' tag is a logical extension.

Still, I would like to see what this implementation does well, and then explore a step back. The requirements we have for this feature come from experience with the current site so I have no reason to dismiss them, but combined they put a lot of constraints on the solution. Meanwhile, if we looked at the current beta site from scratch and wanted to improve search controls we wouldn't come up with these categories, the data behind them, the default state offered to a new user, etc.

Do not call /locations when category filter changes (only when type selection changes)

You can see this version at 5deeed2 - it was as good as the head commit for the exploring the types menu, but it seemed weird that I have to do 'Select all' to enact the choice. It also came with the default state of only some checkboxes being checked, which looked weird on unchecking the default categories and navigating to Grafter or Honeybee. So then I did the head commit version where all type checkboxes are selected by default, but the selection for the map combines categories + types.

What's good and working well? One piece of feedback I got indirectly is, now it's easy to exclude dumpsters, but what else?

Meanwhile I think these design decisions are maybe not working out that well:

default is forager + freegan

When unticking these and ticking "other", and also unticking "include tree inventories", that's the stuff we exclude from the map. I can see some imperfect annotations but not sure if the map is so much better with them excluded that it's worthwhile to justify the complications of not everything being the default.

allow browsing multiple categories at once

When I was learning about what types each category has I did a bit of "check this, uncheck that" to see what's in e.g. just Grafter, but I never wanted to see more than one category at a time.

the site has data in these four kinds of categories

Why are exclusive Freegans (only interested in dumpsters) different from e.g. my pals in Glasgow that press urban apples from juice, and will only be interested in apple trees? Still not sure who a Honeybee user is and how they use the site, do they have urban hives they need to locate? Will a budding urban grafter benefit from the Grafter category? With the current annotation state, it seems to mostly be a way of finding types annotated to a genus level (e.g. apple trees that are annotated as Malus).

I'm thinking maybe the non-default categories would be really good as side avenues to explore if they're presented as a subset of filters together with a title / description, a bit like 'Invasive species in CO', and the default selection could just be all types again or maybe there could be one checkbox that excludes more or what we want to exclude.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants