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

Organism -> Search/Filter/Sort #2657

Closed
justinscherer opened this issue Mar 28, 2018 · 23 comments
Closed

Organism -> Search/Filter/Sort #2657

justinscherer opened this issue Mar 28, 2018 · 23 comments
Assignees
Milestone

Comments

@justinscherer
Copy link

justinscherer commented Mar 28, 2018

Analysis

Our current search/filter/sort component has gone through a lot of surgery over the last 6 months and the scars are showing. Beyond some pesky UI bugs that we haven't fixed yet, the need to include CTAs for saving searches and the sheer number and variability and logic of things to filter by has made this component a complete mess to use.

We desperately need to iron out our data model and the experience of Collections, saved searches, parent/children categories, and surveys, HXL tags. A different issue for a different day...

It's also not clear what our search actually searches for...

^^on some level, all of these data constructions are doing the same thing.

Inspiration

I fully stole a lot of how these filters work from AirBnB

screen shot 2018-04-24 at 4 37 44 pm

screen shot 2018-04-24 at 4 37 52 pm

Solution

Zero state
zero state

Sort open
sort open

Sort on
sort on

Filter open
filter open

Filter on
filter on

Rationale

Ultimately this inherits most of the styles from #2655 and #2789
I stole the idea of baking it into an anchored modal window and having different modal sizes for sort/filter from AirBnB as seen above.

Part of the trouble we have now is that the search/sort/filter mechanism is embedded in the top bar and doesn't feel like it directly controls the data being displayed. To mitigate this, I baked it into a data list #2665

I made creative use of our button styles to achieve on/active states, which I also stole.

@justinscherer justinscherer self-assigned this Apr 24, 2018
@justinscherer justinscherer added the Needs: feedback waiting for feedback from either a team member, client, or user label Apr 24, 2018
@justinscherer justinscherer changed the title Organism -> filter Organism -> Search/Filter/Sort Apr 24, 2018
@crcommons
Copy link
Contributor

@justinscherer @Erioldoesdesign Does the search run the query after each letter is typed or should we put a 1 (or 2, 3...) second delay on the query or should there be a button to search once you've finished typing?

@crcommons
Copy link
Contributor

crcommons commented Jun 21, 2018

A few more questions:

  • Is there a reason the apply and cancel buttons are different for filter and sort?
  • How do you remove the search, sort, and filters?
  • If the query fails, which UI do we use to display the error

@Angamanga
Copy link
Contributor

@Erioldoesdesign @justinscherer Link to QA:
http://preview.ushahidi.com/platform-pattern-library/ui-refresh/assets/html/3_organisms/#pl-pattern-filters (something appears to have happened to the input-box so you might want to wait to qa this)

@Erioldoesdesign
Copy link

Testing in Chrome Version 67.0.3396.87

FE QA notes:

  • In the 'zero state' (default search state) the search magnifying glass icon is currently #1E232A in the PL code and in the design files it is #777777 (a dark grey. This is our lightest accessible grey on a white background)
    The magnifying glass should change to #1E232A for the 'focus' or 'open' state.

  • The copy on the buttons/links is all caps ('SORT' 'SAVED SEARCH') and should be sentence case ('Sort' 'Saved search') for legibility. (remove text-transform: uppercase?)

  • The 'focus' or 'open' state and the 'submitted' or 'on' state should have text at #1E232A (text that is being typed into the search field)

  • The border should be 2px for the 'focus' or 'open' state and the 'submitted' or 'on' state

  • The 'submitted' or 'on' state list of 'Sample...' requires more padding on the left:
    You can see that the list starts about a third in from the left of the 'sort' button.
    Screen Shot 2018-06-22 at 12.21.22.png

  • The copy is currently #1E232A and should be #777777 at all times:
    Screen Shot 2018-06-22 at 12.25.17.png

- The 'focus' or 'open' state 'Cancel' and 'Apply' buttons are in the outlined and solid style in the PL. The designs show a grey 'Cancel' text in #777777 and a blue link in #0000E0 'Apply' in the bottom left and right of the drop down checkbox list:
Screen Shot 2018-06-22 at 12.36.30.png

^^^ Justin's designs actually show two different styles of these buttons you can see in the designs above. I think the button style is better that the grey link text/ blue link text version so no changes here but goo to flag the design inconsistency (sorry Justin!)

  • The squares in the checkboxes look a little too big. I played with the css and got this:

Original:
Screen Shot 2018-06-22 at 12.46.31.png
Screen Shot 2018-06-22 at 12.47.04.png

My edits:
Screen Shot 2018-06-22 at 12.46.22.png
Screen Shot 2018-06-22 at 12.46.15.png

This css I did may break things elsewhere so worth checking over from FE. Illustrates the need for smaller 'black box' inside checkboxes though.

  • The 'Filter open' state's titles a litter too far away for their checkboxes. I got the list checkboxes closer by editing the margin-bottom on the '.ltr-namespace fieldset legend' element (to 10px)

Also the sort/filter list appears in one long vertical. In the designs there are two vertical columns of a maximum of 4 checkboxes (either parent category or child category) per column.
@justinscherer This may become a design problem if we have 1 parent category with more than 3 child categories and the 4th child category might align to the left column in the code structure.
For now, let's keep 1 long column vertical list to eliminate this potential visual dissonance.

THIS IS GREAT WORK. I hope my QA notes aren't too heavy and are clear and understandable :heartemoji:

@sethburtonhall
Copy link

This is great @Erioldoesdesign!! Thank you. There are so many states with this component and it helps to have a QA. As you noticed, I made some "executive" decisions that I meant to communicate (default buttons instead of "gray" and "purple" left and right buttons for better consistency, one long column of checkboxes for better scaling). Your notes are very thorough and clear. I will comb through these and make the changes.

@Erioldoesdesign
Copy link

@crcommons omg I didn't answer your questions...sorry!

Does the search run the query after each letter is typed or should we put a 1 (or 2, 3...) second delay on the query or should there be a button to search once you've finished typing?

I would go with after each letter is typed with a delay. It's a typical and expected user journey now for most users. Though, question: for users with slow connections, are we adding to the load time?

Is there a reason the apply and cancel buttons are different for filter and sort?
How do you remove the search, sort, and filters?
If the query fails, which UI do we use to display the error

I picked up on the different filter/sort buttons in the design. I think that was just a design file error. We get UI 'blindness' sometimes and miss these things!

I would say the user would delete the text in the search bar (it should stay active) and the search results should reset. Either that or we need a 'clear search' button/text link This is one for @justinscherer to have a think about.

Good point! so if there are no results for a search term? We need to display text that says as much. Another consideration for @justinscherer I would say.

(Sorry to load you up with @ mention's Justin...)

@crcommons
Copy link
Contributor

@Erioldoesdesign If we have a delayed query, it would affect slow connections in that it would fire off requests to the API whenever a user paused while typing. So I would recommend a search button perhaps.

We definitely need some way to clear the filters and sort, and need to decide how to clear the search (depending on which search implementation we use).

@justinscherer
Copy link
Author

I picked up on the different filter/sort buttons in the design. I think that was just a design file error. We get UI 'blindness' sometimes and miss these things!

great catch. Let's keep the link style for the CTAs in both sort and filter windows.

I would say the user would delete the text in the search bar (it should stay active) and the search results should reset. Either that or we need a 'clear search' button/text link

When the user submits a query and the results are listed, clicking on the text in the search bar will highlight all of the text. They can then delete it as they wish.

Good point! so if there are no results for a search term? We need to display text that says as much.

Nice catch. Lets say "We didn't find anything that matches your search." in 14px Lato regular in #1e232a

@justinscherer
Copy link
Author

great catch. Let's keep the link style for the CTAs in both sort and filter windows.

@sethburtonhall talked me out of this one. Let's use buttons. Sorry for the flip-flop

@sethburtonhall
Copy link

sethburtonhall commented Jun 26, 2018

@Erioldoesdesign I have integrated your feedback.

Moving back into Design QA pipeline for final approval.

ushahidi/platform-pattern-library@c97d9bf

@crcommons
Copy link
Contributor

@justinscherer So if a user has selected a variety of sorts, filters, and a search, they'll have to go through and remove each one individually? There won't be a way to clear the search completely?

@justinscherer
Copy link
Author

So if a user has selected a variety of sorts, filters, and a search, they'll have to go through and remove each one individually? There won't be a way to clear the search completely?

Great point. The "Cancel" should be a "Clear all" and clicking outside the box or on the sort/filter boxes would do what "Cancel" does...i.e. closes the filter/sort pane without making any changes.

@justinscherer
Copy link
Author

QA:

border-radius on checkboxes should only be 2px

left and right padding between the text and the inside edges of all buttons should be 34px

checkboxes should have 21px of vertical spacing between them

border of open sort pane should be #777777, not #1e232a

checkboxes and buttons should all be 21px spaced from the edges of the box

unclicked checkboxes have a 1px border of #777777 clicked checkboxes have a 2px border of #1e232a

min height for the open sort/filter box is 225px

border radius of open filter pane is 2px not 3px

@justinscherer justinscherer removed Needs: feedback waiting for feedback from either a team member, client, or user UX/UI debt labels Jun 28, 2018
@justinscherer
Copy link
Author

In the results list, the leading on the detail text for each row item should be font-size + 6px so in this case, 20px

@justinscherer
Copy link
Author

Filters with lists of checkboxes/radios of more than 4 items should display them in two columns. Screen Shot 2018-06-28 at 10.47.00 AM.pngshould

@sethburtonhall
Copy link

sethburtonhall commented Jun 29, 2018

@justinscherer I made all revisions except two column checkbox/radio. I am still working on this but I wanted to highlight @Erioldoesdesign's comment from above to make sure.

Also the sort/filter list appears in one long vertical. In the designs there are two vertical columns of a maximum of 4 checkboxes (either parent category or child category) per column.
@justinscherer This may become a design problem if we have 1 parent category with more than 3 child categories and the 4th child category might align to the left column in the code structure.
For now, let's keep 1 long column vertical list to eliminate this potential visual dissonance.

@justinscherer
Copy link
Author

@Erioldoesdesign
re:

This may become a design problem if we have 1 parent category with more than 3 child categories and the 4th child category might align to the left column in the code structure.
For now, let's keep 1 long column vertical list to eliminate this potential visual dissonance.

You're right about this. However, I think the benefit of not having eternal 1 column lists outweighs the risk of losing the indent when there's a parent with a tonne of children. The many children use case feels like an edge case to me, but of course I have zero data or testing to back that up...

What do you think?

@Erioldoesdesign
Copy link

Definitely keen to not have an eternal single column. Perhaps there's something code-wise that can override the layout if this were to occur? Like a rule that always has child categories display in the same 'column' as the parent and then the next parent would carry on the 2-column format?

Sounds a bit complicated but not impossible to my rudimentary understanding of code!

@justinscherer
Copy link
Author

"a rule that always has child categories display in the same 'column' as the parent and then the next parent would carry on the 2-column format?"

Sounds good to me. Let's see what @sethburtonhall and/or @Angamanga says when they're back.

@Erioldoesdesign
Copy link

Everything looks good here to me apart from this issue around double/two column checkbox list in the expanded filter dropdown...

@sethburtonhall Can you take a look at my comment above and see if you can have a dig around to find a potential "rule that always has child categories display in the same 'column' as the parent and then the next parent would carry on the 2-column format"

If it's a no then I believe Justin still wants the 2-column view.

@rowasc rowasc modified the milestones: Cycle 7, Cycle 8 Jul 31, 2018
@Erioldoesdesign
Copy link

Erioldoesdesign commented Aug 7, 2018

Updating this ticket with a comment from our design sync today in that we're going with a single column of checkboxes for sort and filter as the 2-column, max 4 items proved difficult to layout with anomalies for checkbox lists of uneven numbers.

Moving back into ready for FE because I believe @sethburtonhall is currently working on what we discussed

@sethburtonhall
Copy link

This is ready for QA here

@Erioldoesdesign
Copy link

This looks fly. Closing this ticket :D

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

No branches or pull requests

7 participants