[MGNLUI-1447] Keep selected items count in footer in Pulse messages categories other than ALL Created: 24/May/13  Updated: 18/Oct/17  Resolved: 18/Oct/17

Status: Closed
Project: Magnolia UI
Component/s: pulse
Affects Version/s: 5.0
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Federico Grilli Assignee: Unassigned
Resolution: Outdated Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLUI-1404 Add the ability to remove messages Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

In essence, the footer allows access to an action context menu for performing operations on the currently selected messages and displays a status, that is the number of total messages present in the container and the number of selected items.
Now, this works fine when we're in the ALL messages category but as soon as we change category things stop working.

Suppose you have an error and an info message. You're in ALL category and select the error message, the footer will display

  • 2 messages, 1 selected

and that's all fine and well.

Now you switch to INFO category, the footer will display

  • 1 message, 1 selected

And that's wrong. The total message count is correct but no message should be displayed (only the error message is currently selected).
Now you select the only info message and the footer will display

  • 1 message, 2 selected

Hmmm… What's worse is that if you try to execute an action via the action pop (say a deletion) it will also be performed on the message selected in the other category which is definitely not what we want.

As far as I could see, the underlying Vaaadin container is applied a filter by MessageCategory which actually works for the total items count container.getItemIds() but not for the selected ones container.getValue() the latter returning a Set in our case.
As a temporary workaround atm I'm unselecting all selected items when switching category.


Generated at Mon Feb 12 08:46:40 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.