Motivation
When working with large API collections, users need to quickly understand the scope and organization of their workspace. Currently, collection folders in the sidebar show only their name and icon, with no indication of how many requests they contain. This makes it difficult to assess at a glance which collections are actively used, which are empty, or which might need reorganization.
Adding a count badge to display the number of requests in each collection would improve the user experience by providing immediate visual feedback about collection size.
Current Behavior
Collection folders in the API Client sidebar display only the folder name and icon. Users must expand each folder to see its contents and cannot tell at a glance how many requests are contained within each collection.
Reproduction Steps:
- Open the Scalar API Client
- Create multiple collections with varying numbers of requests (e.g., one with 1 request, another with 2, another empty)
- Look at the sidebar where collections are listed
- Observe: Only collection names and icons are visible
- Note: There is no visual indicator of how many requests each collection contains
Expected Behavior
Each collection folder in the sidebar should display a small badge showing the number of requests it contains. The badge should be visually distinct but not overwhelming, positioned near the collection name. Empty collections (0 requests) might show no badge or show "0" depending on UX preference.
Acceptance Criteria:
Steps To Test
- Start the API Client with
pnpm dev:client
- Create a new collection and add 3-5 requests to it
- Verify a badge appears showing the correct count
- Add another request and verify the count increments
- Delete a request and verify the count decrements
- Create a collection with nested folders containing requests and verify the count includes all nested requests
- Create an empty collection and verify it shows no badge
Submission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx
Motivation
When working with large API collections, users need to quickly understand the scope and organization of their workspace. Currently, collection folders in the sidebar show only their name and icon, with no indication of how many requests they contain. This makes it difficult to assess at a glance which collections are actively used, which are empty, or which might need reorganization.
Adding a count badge to display the number of requests in each collection would improve the user experience by providing immediate visual feedback about collection size.
Current Behavior
Collection folders in the API Client sidebar display only the folder name and icon. Users must expand each folder to see its contents and cannot tell at a glance how many requests are contained within each collection.
Reproduction Steps:
Expected Behavior
Each collection folder in the sidebar should display a small badge showing the number of requests it contains. The badge should be visually distinct but not overwhelming, positioned near the collection name. Empty collections (0 requests) might show no badge or show "0" depending on UX preference.
Acceptance Criteria:
Steps To Test
pnpm dev:clientSubmission
Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.
Guide to submitting pull requests: https://hackmd.io/@timothy1ee/Hky8kV3hlx