feat(groups): unify list, show join date, add sort control - #53
Conversation
- Drop the public/private membership split on /groups: a single sorted
list now shows every group the user belongs to.
- Remove the per-row Accept (UserCheck) and Remove-public (UserX)
buttons and their handlers.
- Surface the joinedAt timestamp from the group service on each row
("Joined Mon DD, YYYY"). Plumbed through Group type and resolveGroups.
- Drop the now-unused .org-list__divider/__accept-btn/__remove-public-btn
styles and add a small .org-list__item-meta style for the date line.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a dropdown above the group list with four sort modes: joined oldest first (default), joined newest first, name A→Z, name Z→A. Rows missing joinedAt always sort to the bottom of joined-* views. The control is hidden when there are 0 or 1 groups. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the labeled sort dropdown below the description with a single ArrowUpDown icon next to the group count. The native select sits transparently on top of the icon so clicking it opens the OS menu with the four sort options. Current mode is reflected in the button's title attribute. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Accepted items from docs/groups-list-improvements/review-round-1.md: - Sort comparator: drop redundant lowercasing, use locale-aware case-insensitive comparison (sensitivity: "base"). - Decorate-sort-undecorate: parse joinedAt once per group instead of on every comparison, and reuse the display label. - aria-hidden -> aria-hidden="true" on the icon for codebase consistency. - Validate the SortMode value in the select onChange against the hardcoded option set before calling setState. - Move the title attribute onto the <select> (so keyboard users see the tooltip) and surface the current mode in aria-label so screen readers announce it. - Replace the dead-end "Owners can't leave the group" tooltip with actionable guidance pointing at group settings. - Extract a local displayLabel const inside renderOrgItem to remove six repetitions of "displayName || handle". Rejected items recorded with rationale in the same doc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Both round-2 reviewers returned ship verdicts. Accepted items (see docs/groups-list-improvements/review-round-2.md): - Drop the "current: <label>" suffix from the <select>'s aria-label; native screen readers already announce the selected option text after the role, making the suffix duplicate the announcement. Title attribute kept for sighted keyboard/mouse users. - Update stale "lowercased label" comment in sortedOrgs and add a one-liner noting that ES2019 sort stability handles equal-key ties. - Extract isSortMode type predicate for the onChange validator; widen SORT_VALUES to ReadonlySet<string> so the predicate input is plain string and the two `as SortMode` casts go away. Rejected items (with rationale) recorded in the same doc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
Summary
/groups: a single sorted list now shows every group the user belongs tojoinedAtfrom the group service on each row ("Joined Mon DD, YYYY")joinedAtthroughGrouptype +resolveGroups.org-list__divider*,.org-list__accept-btn*,.org-list__remove-public-btn*) and add.org-list__item-meta,.org-list__header-right,.org-list__sort-icon-*Out of scope
accepted=truePDS membership recordsTest plan
/groupsrenders one list with role-irrelevant ordering driven by the sort controljoinedAt(legacy data) sort to the bottom of joined-* viewsgroups.length <= 1🤖 Generated with Claude Code