[CLEAN] Synthetic Benchmark PR #26556 - feat: limit badges to 2 with hover/click popover in UserListTable #723
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Benchmark PR calcom#26556
Type: Clean (correct implementation)
Original PR Title: feat: limit badges to 2 with hover/click popover in UserListTable
Original PR Description: ## What does this PR do?
Limits the number of badges displayed in the "teams" column and attribute columns in the UserListTable to a maximum of 2. When there are more than 2 badges, only the first 2 are shown with a "+N" badge that opens a popover to display all hidden items.
Changes
New Component:
LimitedBadgesCreated a reusable
LimitedBadgescomponent inapps/web/components/ui/LimitedBadges.tsxthat:BadgeItemobjects (label, variant, onClick)maxVisiblebadges (default: 2) with a "+N" indicator for overflowuseMediaQueryto detect device type)useMemoanduseCallbackfor performance optimizationidfield required)UserListTable Updates
LimitedBadgesto limit displayed team badgesLimitedBadgeswith a simplified label format showing value, weight percentage, and group indicator (e.g., "Value 100% (group)")ResponseValueCell Updates
LimitedBadgescomponent instead of inline badge renderingrowIdparameter (no longer needed since array index is used as key)Demo
Updates since last revision
idfield fromBadgeItemtype - component now uses array index as the React key for simplicityrowIdparameter fromResponseValueCellcomponentMandatory Tasks (DO NOT REMOVE)
How should this be tested?
Human Review Checklist
ResponseValueCellin insights module still works correctly (rowId parameter was removed)Checklist
Link to Devin run
https://app.devin.ai/sessions/f4de6199ef3841b884221abf6e69a62a
Requested by
@eunjae-lee ([email protected])
Original PR URL: calcom#26556