-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Showing the document count requires an additional run of count, outside of the find we run for documents. Let's run it in parallel and show it in the UI when it returns. Let's cap the request at 5000ms. Here's where we do the count in Compass's Documents tab: https://github.com/mongodb-js/compass/blob/0441b94add3bb7ff80d71625767915ea140bbdcf/packages/compass-crud/src/utils/cancellable-queries.ts#L6
When the count request errors or times out (with the 5000 ms maxTimeMS), let's show a `?` for the count with a tooltip on it that's the similar to the one shown in Compass: https://github.com/mongodb-js/compass/blob/0441b94add3bb7ff80d71625767915ea140bbdcf/packages/compass-crud/src/components/crud-toolbar.tsx#L129
Some more context, in a later milestone we'll use this same logic for when we're showing aggregation results (although then the count will require a click to run, like in Compass' aggregations tab).
- depends on
-
VSCODE-728 Add document list and actions to the data browser
-
- Needs Triage
-
- is depended on by
-
VSCODE-730 Remove the data browsing feature flag; release the feature
-
- Needs Triage
-