Skip to content

Improved event filters#579

Merged
erdgeist merged 10 commits intofrab:masterfrom
elad-eyal:improved_event_filters
Nov 3, 2019
Merged

Improved event filters#579
erdgeist merged 10 commits intofrab:masterfrom
elad-eyal:improved_event_filters

Conversation

@elad-eyal
Copy link
Collaborator

@elad-eyal elad-eyal commented Oct 8, 2019

This PR adds a few improvements to filterings.

  1. Add filtering for numeric values i.e., average rating, number of ratings, average review score.

  2. The tables and the "filters" pane are now subject to i18n

image

  1. For text filters - capability to filter several options together; i.e., show all events in "rejected" and "rejecting" state.

image

  1. Harmonization of the filter logic so the same code is re-used.

  2. Format change for the active filter list. Clicking on the filter opens the modal filter editor (for both text and numeric filters)

image

image

  1. Filter icon in the table headers - gray if not used (not being filtered by this coloumn) ; blue outline if being filters with this coloumn. It changes color to full blue when hovering the mouse, as an invitation to click.

I rewrote everything in this PR and edited it in steps so it should be easier to review.

@elad-eyal elad-eyal force-pushed the improved_event_filters branch 7 times, most recently from 20e3781 to 71c361c Compare October 14, 2019 13:24
@elad-eyal elad-eyal force-pushed the improved_event_filters branch from 71c361c to d34d4cb Compare October 20, 2019 14:13
@erdgeist
Copy link
Contributor

It would be great to rebase all of the PRs currently pending on master. Currently most of them seem to belong in a certain order and I can't merge the newer ones for lack of experience with what the earlier commits do.

@elad-eyal elad-eyal force-pushed the improved_event_filters branch 4 times, most recently from fabd528 to d5bfeaa Compare October 26, 2019 13:21
@elad-eyal elad-eyal mentioned this pull request Oct 27, 2019
@elad-eyal elad-eyal changed the title Improved event filters WIP! Improved event filters Oct 28, 2019
@elad-eyal elad-eyal force-pushed the improved_event_filters branch from d5bfeaa to 92871b6 Compare October 29, 2019 14:49
@elad-eyal elad-eyal changed the title WIP! Improved event filters Improved event filters Oct 29, 2019
@erdgeist
Copy link
Contributor

Okay, time to rebase ;)

@erdgeist
Copy link
Contributor

Looking through the patch, I see several UX sins already. My [x] hack has been bad enough and I've always wanted to replace it by some more intuitive way like the ❌ sign or other graphical element easy enough to spot. But hiding the comparison operator behind a toggle character is just way too unintuitive. I'd suggest (and later implement once this PR is aligned with master) to visually group each filter with a decent border and some darker fill, and make the operator a drop down:

X [ value ≥ 2 ]
[ value > 2 ]
[ value ≤ 2 ]

so that you immediately see that there are some options and what will be the option after you select it.

@elad-eyal elad-eyal force-pushed the improved_event_filters branch from 92871b6 to df6a5c5 Compare October 29, 2019 21:21
@elad-eyal
Copy link
Collaborator Author

@erdgeist

How about this? The X icon removes the filter; the ⭮ icon cycles between ≥ = ≤ ; the link "multiple" opens the multi-value selector

image

@erdgeist
Copy link
Contributor

Why would only "multiple" open the selector? Allowing the same on "Confirmed" in that case would add consistency to the interface. Also, why the ⭮ icon, if you can actually show what happens next (i.e. the operator that would be selected if you click on the right button)?

But besides that, I like where this is going. Really looks a lot tidier than my initial hack.

@erdgeist
Copy link
Contributor

Even better: If there's only three operators, you can just put the two NOT currently selected in the box to the right so that you do not have hidden options.

What I still find irritating is that you can't change the numeric value we compare against. You have to manually look for an entry with a matching value to start this filter. From an interface perspective: Why would you use the "average of 3.4" as a starting point to compare against? Find the submissions that are equally(?) well ranked? Or find all submissions that are ranked better than the one shown here?

I come to think that since you obviously now have a good model of modals, clicking on these numbers in the list should open a modal allowing to select the operator and narrowing down the exact number to filter against. But maybe I mis-understood the workflow you had in mind.

@elad-eyal
Copy link
Collaborator Author

elad-eyal commented Oct 30, 2019

We can have this:

image

and I can probably add the third operator ≥ as a second button next to the = so that there are no hidden options.

The behaviour I was thinking about is that the moderators will sort the submissions based on one criteria, then filter out everything worse, then continue. I'm having a bit of a trouble imagining a modal window that would make sense.

@erdgeist
Copy link
Contributor

The more I think of it, the less sense makes adding a filter by clicking on the number. The way I see it would be to add a filter symbol next to the title of the column and then add a modal that behaves differently for counts (like the event rating count) and review averages.

I can see why you would want to select based on "worse than this average", e.g. so you can bulk-update them to rejected or send bulk mail. But I have a hard time imagining why you would want to filter "everything with more than two reviews" or "exactly two reviews", when you actually only would want to sort to see the ones that have received the least attention, so that they pop up at the top of the list.

@erdgeist
Copy link
Contributor

While I am at it: I'm maintaining a companion tool for a while that does exactly what you're working on here and I've received quite some feedback on it. It gets the events per track from frab in a cron job, and then renders a list that can be filtered with a type-ahead filter, sorted by all review categories plus their combined average, sorted by the amount of reviews, sorted by the own review count (0 or 1) and sorted randomly – so that every reviewer can work through a different set of events when starting from the top).

The tool is here https://erdgeist.org/gitweb/c3rater/tree/ and if you drop me a DM, I can show you a link to a live demo version.

@elad-eyal
Copy link
Collaborator Author

OK I almost got it:

image

Can you DM in GitHub? I didn't know. Can you e-mail me by adding changing my username - replace - to @ and add .com

@erdgeist
Copy link
Contributor

I just noticed, there's even a public documentation for the tool :) https://content.events.ccc.de/rater.html

@elad-eyal elad-eyal force-pushed the improved_event_filters branch from df6a5c5 to ff4df12 Compare November 1, 2019 22:09
@elad-eyal
Copy link
Collaborator Author

@erdgeist I updated this using modal filter window for both text and numeric.

@elad-eyal elad-eyal closed this Nov 1, 2019
@elad-eyal elad-eyal reopened this Nov 1, 2019
@erdgeist
Copy link
Contributor

erdgeist commented Nov 2, 2019

This looks and works amazing. Just two more pixels below the filters bar and I'd merge it. :)

@erdgeist
Copy link
Contributor

erdgeist commented Nov 2, 2019

Just a little question, the "Showing XX of YY Events" we were talking about in #577 went away? Oh, I noticed, it was never part of the PR. Shall I add a new one for this feature?

@elad-eyal elad-eyal force-pushed the improved_event_filters branch from ff4df12 to 55ebe25 Compare November 2, 2019 22:00
@elad-eyal
Copy link
Collaborator Author

I added a few pixels below the filter bar. is this what you mean?

image

div.filters-row {

@elad-eyal elad-eyal closed this Nov 2, 2019
@elad-eyal elad-eyal reopened this Nov 2, 2019
@erdgeist
Copy link
Contributor

erdgeist commented Nov 2, 2019

I just noticed that when your session expires and you klick the filter icons, nothing happens (because the modal route is not answered?) until I reloaded the page and then was asked to log in again.

@erdgeist
Copy link
Contributor

erdgeist commented Nov 3, 2019

Looks like the last merge broke your CSS, a closing bracket is missing.

Event list pages recognize filters such as
event_type=demo|poster to match either
demo or poster.

A couple of models are changed to make sure the symbol "|"
is ised only as seperator and never as operand.
Add a modal window for multi-option filtering

Conflicts:
	app/assets/stylesheets/frab.css
Allow clicking on filter pane to edit filter details;

If multiple options are selected, the filter pane will
show "multiple" instead of enumerating the options
enabled.
Add "Clear filter" button to the filter modal
@elad-eyal elad-eyal force-pushed the improved_event_filters branch from b4fc817 to b33a355 Compare November 3, 2019 17:34
@elad-eyal
Copy link
Collaborator Author

I just noticed that when your session expires and you klick the filter icons, nothing happens (because the modal route is not answered?) until I reloaded the page and then was asked to log in again.

I added a page refresh in case of modal load error; so in the case @erdgeist described, user will be presented with login screen instead of no response.

error: () ->
location.reload(true)

Looks like the last merge broke your CSS, a closing bracket is missing.

fixed

@erdgeist
Copy link
Contributor

erdgeist commented Nov 3, 2019

Amazing work. Thanks.

@erdgeist erdgeist merged commit c922656 into frab:master Nov 3, 2019
@elad-eyal elad-eyal deleted the improved_event_filters branch November 3, 2019 18:17
@elad-eyal
Copy link
Collaborator Author

Thanks :-)

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