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

122/137: Filtering of project search #138

Merged
merged 13 commits into from
Jun 3, 2020
Merged

122/137: Filtering of project search #138

merged 13 commits into from
Jun 3, 2020

Conversation

benlk
Copy link
Collaborator

@benlk benlk commented May 28, 2020

Changes

This pull request makes the following changes:

  • adds filters for project organization type and project category
  • adds first-pass styles for the project terms, being the two mentioned above and the project status. Different colors are applied to each to aid in debugging.
  • adds first-pass styles for the search controls on desktop, to make them appear in a single line and to make the control for the project categories into a dropdown

Screen Shot 2020-05-28 at 14 32 35
Screen Shot 2020-05-28 at 14 32 41

Why

For #137

Testing/Questions

Features that this PR affects:

  • search on /local-that-works/ and on any page with the project shortcode
  • filtering of that search
  • LMP on that search

Questions that need to be answered before merging:

  • Is this PR targeting the correct branch in this repository?
  • What should the actual styles for this look like, on desktop and on mobile?
  • Do we want to try to keep this hack of a dropdown, improve it, or replace it with a scrollable box of limited height containing the list of terms?
  • The term links on the individual project items are links to those term archives, not to this page's search results. Do we want to make that the case?
  • The search params for project org type and project category use numeric term IDs instead of slugs. Should they use slugs instead?

Steps to test this PR:

  1. search for things. Filter by categories and other things. Click the LMP button.

@joshdarby
Copy link

The term links on the individual project items are links to those term archives, not to this page's search results. Do we want to make that the case?

Probably. If we didn't, we'd need to update the posts that display on the archive page and make sure they link to the local projects page with a param to the specific project instead of the actual project post page

The search params for project org type and project category use numeric term IDs instead of slugs. Should they use slugs instead?

I think that's fine unless we think people will be manually typing in the URL for specific categories?

@joshdarby
Copy link

Is it necessary to have a second search bar appear when there are no search results found?

Screen Shot 2020-05-29 at 1 37 25 PM

@joshdarby
Copy link

Other than the few things above, this functions as expected!

@benlk benlk changed the title 122: Filtering of project search 122/137: Filtering of project search Jun 2, 2020
@benlk
Copy link
Collaborator Author

benlk commented Jun 2, 2020

The links should work now.

Screen Shot 2020-06-02 at 18 17 23

With thanks to https://www.filamentgroup.com/lab/select-css.html and an inline'd PNG, we have much better-looking dropdowns now.

@benlk benlk requested a review from joshdarby June 2, 2020 22:41
@joshdarby
Copy link

@benlk The new changes look great!

One last question:

If a user clicks on a category inside of a project in the projects list and gets taken to a page that is now querying that category, should we update the dropdown to display that category as checked?

@benlk
Copy link
Collaborator Author

benlk commented Jun 3, 2020

should we update the dropdown to display that category as checked?

It should have; it wasn't. This identified a bug: the param used for these links was incorrect.

Since #138 (comment):

  • Terms in the list view now use the correct parameter for project categories
  • The parameter for organization type has been updated to match the parameter for project categories
  • Adds support for clicking on the project status to filter by that
  • Does not provide filter UI for project status

@benlk benlk merged commit 7f8cbaf into staging Jun 3, 2020
@benlk benlk deleted the 122-filtering branch June 3, 2020 18:48
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