Merged
Conversation
Signed-off-by: NaYeong,Kim <nayeongkim@megazone.com>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
Contributor
|
✅ There are no commits in this PR that require review. |
Contributor
|
🎉 @seungyeoneeee has been randomly selected as the reviewer! Please review. 🙏 |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a members field to each user group entry to surface the count of users in the dropdown.
- Include member count in the group map
- Pulls
.lengthfrom the users array for display
Comments suppressed due to low confidence (2)
apps/web/src/common/modules/user/UserSelectDropdown.vue:134
- [nitpick] The property name
memberssuggests a collection. Rename tomemberCountfor clarity that it holds a count.
members: storeState.userGroupReferenceMap[userGroupId]?.data.users?.length,
apps/web/src/common/modules/user/UserSelectDropdown.vue:134
- There’s no test covering cases when a group has no users or the
data.usersfield is missing. Consider adding a unit test for the member count fallback behavior.
members: storeState.userGroupReferenceMap[userGroupId]?.data.users?.length,
| return props.userGroupPool?.map((userGroupId) => ({ | ||
| name: userGroupId, | ||
| label: storeState.userGroupReferenceMap[userGroupId]?.label || storeState.userGroupReferenceMap[userGroupId]?.name || userGroupId, | ||
| members: storeState.userGroupReferenceMap[userGroupId]?.data.users?.length, |
There was a problem hiding this comment.
If data.users is undefined or empty, members will be undefined. Consider defaulting to zero: ...users?.length || 0.
Suggested change
| members: storeState.userGroupReferenceMap[userGroupId]?.data.users?.length, | |
| members: storeState.userGroupReferenceMap[userGroupId]?.data.users?.length || 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Skip Review (optional)
style,chore,ci,test,docs)Description (optional)
SSIA
Things to Talk About (optional)