CouncilDataProject / seattle_v2

Website for interacting with Seattle's instance of CDP
https://councildataproject.github.io/seattle
BSD 3-Clause "New" or "Revised" License
5 stars 6 forks source link

Choosing "Sort By" without choosing "Sort Order" does not sort entries #80

Closed john-patterson closed 4 years ago

john-patterson commented 4 years ago

System and Software

Page or Route

Description

When choosing a new sort from either a default or "Clear"ed state, no default sorting order is implied and neither radio button is selected. The "Save" button also does not validate that a sorting order was chosen to enable itself. If you "Save" without specifying an order, the sort has no effect on the data set.

Notes

Here are two suggestions to solve this, either:

or

evamaxfield commented 4 years ago

Hey @john-patterson thanks for reporting the issue! How would you feel about #77 Which drops the sort options to simply two categories: "Sort by Relevance" and "Sort by Date" both descending.

@tohuynh want to quickly tackle this one?

john-patterson commented 4 years ago

@JacksonMaxfield I think it makes sense that I wouldn't want to sort by Committee name if I can already filter by it.

Relevancy sorting seems like it should always be done descending. I can't picture ever wanting to know what the least relevant hit is.

Maintaining Asc & Desc sort for dates seems to make sense, though. I could want to know when a topic was first mentioned and find the preliminary discussions around it, but I might also want to find the latest news on a topic.

evamaxfield commented 4 years ago

Gotcha. At the bare minimum I think we can drop it to just the two sort options. I don't know how to design basically one option that is a single choice and one option that has sub choices. Will talk to UX designers about it and hopefully make a decision and have something updated later this week.

john-patterson commented 4 years ago

@JacksonMaxfield by no means a UX expert myself, but here are my ideas:

Descriptions

  1. "Sort by relevancy descending" is just the default sort when no other sort is applied. If you don't like hiding that decision from the user, including a text blurb: "Currently sorting by most relevant" makes it explicit.

  2. You could turn the UI for sorting based on date into three options: "Do not sort by date" (or "Sort by Relevancy"), "Sort by latest first," and "Sort by earliest first".

  3. Sort by date can be a checkbox, a dropdown for Asc/Desc can appear if the checkbox is enabled.

  4. The search result page could be more table-like. Relevancy percentage and date could be columns. Clicking the column header would sort by that column and add an up or down arrow indicating Asc or Desc. Clicking the header again would change between Asc and Desc and change the direction of the arrow on that column header. For simplicity, you can only ever sort by one column.

EDIT: I have some mocks.

Diagrams

(1) and (2)

(1) and (2) are reducible to this: image

(3)

(3) I'm picturing something like this: image

transitioning to

image

(4)

(4) I chose to sort on Relevancy and Meeting Name in this mockup purely for ease of getting a mock.

Here's no ordering: image

Once you click "Relevancy", the screen becomes this. By Relevancy, ascending: image

Once you click "Relevancy" again, the screen becomes this. By Relevancy, descending: image

Once you click "Meeting Name", the screen becomes this. By Meeting Name, ascending: image

And so on.

evamaxfield commented 4 years ago

Woah! Thanks for these. I hadn't thought about simply including the third option of "Newest First" and "Oldest First" I think I like that idea the most. Keep's it simple. Will talk it over with the UX team and show them these.

evamaxfield commented 4 years ago

Adding on to this, I think the list of sort options should probably be:

evamaxfield commented 4 years ago

Alright update on this!

We are going to go with the following:

Most Relevant will be weighted by recency

Sound good?

tohuynh commented 4 years ago

Sounds good. The default is going to be Most Relevant. What do you think should happen if the users click 'Clear"? The default becomes selected or none is selected (but events are still sorted by Most relevant)?

evamaxfield commented 4 years ago

I thought we were just going to go with the cdp-instance implementation which is just radio buttons right? So there wouldn't be a clear button. Or can we have it be a dropdown instead of radio buttons? That way one is always selected

tohuynh commented 4 years ago

OK, currently I made it so that all the filter popups have Clear and Save buttons. I can change it so that SelectSorting Popup won't have Clear and Save buttons.

evamaxfield commented 4 years ago

That would be perfect. Thanks! I will work on getting npm publishing setup.

john-patterson commented 4 years ago

Sounds good to me!

evamaxfield commented 4 years ago

@john-patterson thanks for reporting the original issue. The changes are now deployed on the website. Thanks to @tohuynh for fixing :rocket: