open-build-service icon indicating copy to clipboard operation
open-build-service copied to clipboard

Multiple notification filters

Open ncounter opened this issue 9 months ago • 3 comments

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

image

After

image

ncounter avatar May 07 '24 08:05 ncounter

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.

Screenshot 2024-05-13 at 12-55-04 Open Build Service

saraycp avatar May 13 '24 10:05 saraycp

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.

Screenshot 2024-05-13 at 12-55-04 Open Build Service

Yeah, that sounds like a bug

danidoni avatar May 13 '24 12:05 danidoni

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.

ncounter avatar May 14 '24 08:05 ncounter

Superseded by https://github.com/openSUSE/open-build-service/pull/16183

ncounter avatar May 27 '24 15:05 ncounter