Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-1977

Query refresh button should also refresh top right collection stats

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.31.3
    • Affects Version/s: None
    • Component/s: Query Bar
    • None
    • 2
    • Not Needed

      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

            Assignee:
            Unassigned Unassigned
            Reporter:
            sean.oh Sean Oh
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: