[COMPASS-1977] Query refresh button should also refresh top right collection stats Created: 12/Sep/17  Updated: 29/Oct/23  Resolved: 16/May/22

Status: Closed
Project: Compass
Component/s: Query Bar
Affects Version/s: None
Fix Version/s: 1.31.3

Type: Task Priority: Minor - P4
Reporter: Sean Oh Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by COMPASS-4641 Refresh buttons don't refresh the Doc... Closed
Related
is related to COMPASS-6678 Refresh buttons don't refresh the num... Open
Story Points: 2
Documentation Changes: Not Needed

 Description   

Intercom Pain Point

Currently, pressing the refresh button in the query action bar will refresh the count in the message "Query returned X documents". However, pressing the refresh button will not update the top right collection stats.

This is problematic since the user can see two conflicting numbers concerning the total document count in a collection. Let's say there are 5 documents in the collection view. A user adds 5 more documents and presses refresh. They will see:

  1. "Query returned 10 documents" in the query action bar and
  2. Documents 5 in the top right collection stats

We should change the query bar refresh button to also update aggregate collection stats. This can be done by having the collection-stats store listen to the refreshDocuments action in Crud plugin. Very similar to how it currently listens to documentRemoved action.

Acceptance criteria:

  • listen to refreshDocuments action in collection stats store and call loadCollectionStats
  • add unit tests to show that appropriate calls are being made

Generated at Wed Feb 07 22:28:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.