Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2828 +/- ##
==========================================
+ Coverage 72.20% 72.21% +0.01%
==========================================
Files 134 134
Lines 7454 7457 +3
Branches 1528 1556 +28
==========================================
+ Hits 5382 5385 +3
+ Misses 2026 1944 -82
- Partials 46 128 +82 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds card count indicators to tags in the CardStack component to help users understand how many cards are associated with each tag. The implementation modifies the tag mapping logic to track counts and displays them in badges alongside the existing tag selection checkmarks.
Changes:
- Modified
updateTagMapping()function to calculate and store the number of cards associated with each tag - Added a count badge display in the tag UI, positioned between the tag name and the selection checkmark
- Added comprehensive test coverage for the tag counting feature including edge cases
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/vue-components/src/cardstack/CardStack.vue | Added count property to tag mappings, updated initialization logic to track tag occurrences, added count badge UI element, and adjusted CSS spacing for tag indicators |
| packages/vue-components/src/tests/snapshots/CardStack.spec.js.snap | Updated snapshot to reflect the new count badge in tag display |
| packages/vue-components/src/tests/CardStack.spec.js | Added four new test cases covering count initialization for custom tags, count increments for duplicate tags, count badge display, and badge ordering |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Can consider adding a boolean flag to set as false or true to disable the count per tag (default: show) |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/vue-components/src/__tests__/__snapshots__/CardStack.spec.js.snap
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@yihao03 Also update the PR description with the latest UI screenshots. |

What is the purpose of this pull request?
Overview of changes:
Add card counts to tag. Updated the
updateTagMapping()function inCardStack.vueto calculatethe number of cards associated with each tag and store this information in the
tagMapping.Displays the count between the tag text and the tickbox in the tags. Closes #2808
Anything you'd like to highlight/discuss:
How should I make it look prettier or is this fine?
Testing instructions:
Run
markbind serve -dto serve the docs and checkout the cardstack documentation pages.Proposed commit message: (wrap lines at 72 characters)
Add card counts to tags in CardStack component
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
At the end of the review, please label the PR with the appropriate label:
r.Major,r.Minor,r.Patch.Breaking change release note preparation (if applicable):