open-build-service
open-build-service copied to clipboard
Multiple notification filters
What's changed?
Before, there was a list of links, where every link was loading a different subset of notifications based on a query string parameter type=....
. It was possible to load one type of notifications at a time.
I.e.:
- All Unread notifications
- All Comment notifications
- All home:my_project notifications
After, there are a list of filter options (the same amount of before), but now they are checkboxes, part of a form that can be submitted by an Apply
button; this submit loads a subset of notifications filtered by the criteria of the checkboxes selection, this time as a multiple flavors selection based on status/type/project/group
at the same time combining them with an AND
among the filter group, and with an OR
among the internal filter group option.
I.e.:
- All Unread AND (Comments OR Requests) AND home:my_project
- All Read AND (Reports OR Roles Revoked
- All (Read OR Unread) AND Incoming Requests
Note
By default, if no filter is selected at all, it returns the list of Unread
notifications only and it automatically check the Unread
filter checkbox. It is intended to be so because at first, the user wants to read the Unread notifications only. Just in case the user selects the Read
filter checkbox and applies the filter, then the read notifications will be rendered too.
- No status selected (no Read|Unread) --> Unread notifications only
- Read selected --> Read notifications only
- Unread selected --> Unread notifications only
- Both Read|Unread selected --> Both Read and Unread notifications returned
Note 2
Now that potentially both Read and Unread notifications are selected and rendered, when that scenario happens, the notification action bar that contains the select all checkbox and Mark all as read|unread button is not visible, due to the risk of misunderstanding: it would not be a mark as but it would be a toggler of the state of each selected notification, which is seldom the desired behavior for a multiple selection.
Before
After
The counters are a bit confusing. Look at this screenshot, I filtered by Read
and there are 4 results. However, the filter says there are 10 notifications related to the project home:Admin
. I would expect the counter says how many of the four read notifications are also related to home:Admin
.
The counters are a bit confusing. Look at this screenshot, I filtered by
Read
and there are 4 results. However, the filter says there are 10 notifications related to the projecthome:Admin
. I would expect the counter says how many of the four read notifications are also related tohome:Admin
.
Yeah, that sounds like a bug
Apart from the feedback from others, I caught the following:
* Text in the spec * Confusing behaviour of the counters (mentioned in a previous comment).
@saraycp both points are addressed: the test got dropped (it was stale) and the counting bug got fixed.
Superseded by https://github.com/openSUSE/open-build-service/pull/16183