Skip to content

Conversation

@lovincyrus
Copy link
Contributor

@lovincyrus lovincyrus commented Apr 18, 2025

This pull request consists of the changes to the org user page v2. Tested with admin, viewer, editor, guest.

Closes #7029

CleanShot.2025-04-18.at.12.12.37.mp4

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Summary by Bito

This pull request enhances the organization users page with role-based improvements and new components including a guest role upgrade dialog and filtering mechanism. It improves several components like the users table, avatar item, and chip display to better represent user roles, refining the user experience and supporting robust role-based access control.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 3

@lovincyrus lovincyrus self-assigned this Apr 18, 2025
@lovincyrus lovincyrus marked this pull request as ready for review April 18, 2025 19:31
@bito-code-review
Copy link

bito-code-review bot commented Apr 18, 2025

Code Review Agent Run #caed03

Actionable Suggestions - 2
  • web-admin/src/features/organizations/users/OrgUsersTableRoleCell.svelte - 1
    • Admin role option restricted to existing admins · Line 122-135
  • web-admin/src/routes/[organization]/-/users/+page.svelte - 1
    • Binding to undefined filterSelection variable · Line 153-153
Additional Suggestions - 10
  • web-admin/src/features/organizations/users/OrgUsersTable.svelte - 1
    • Duplicated role information in multiple cells · Line 76-76
  • web-admin/src/features/organizations/users/AvatarListItem.svelte - 2
    • Unused role prop added but not utilized · Line 14-14
    • Redundant Guest text in Chip component · Line 46-48
  • web-admin/src/routes/[organization]/-/users/+page.svelte - 3
    • Unused filterSelection variable adds unnecessary complexity · Line 24-24
    • Missing gap styling in flex container · Line 144-144
    • Duplicated user type check logic · Line 103-104
  • web-common/src/components/menu/OrgUsersFilters.svelte - 1
    • Inconsistent text capitalization between CSS and code · Line 17-19
  • web-admin/src/features/organizations/users/OrgUsersTableActionsCell.svelte - 1
    • Duplicated role checking logic could be simplified · Line 28-32
  • web-admin/src/features/organizations/users/OrgUsersTableRoleCell.svelte - 1
    • Duplicated role update logic in handleUpgrade function · Line 75-104
  • web-admin/src/features/organizations/users/OrgUpgradeGuestConfirmDialog.svelte - 1
    • Unnecessary async keyword in handleUpgrade function · Line 18-25
Review Details
  • Files reviewed - 10 · Commit Range: b45f766..4891135
    • web-admin/src/features/organizations/users/AvatarListItem.svelte
    • web-admin/src/features/organizations/users/OrgUpgradeGuestConfirmDialog.svelte
    • web-admin/src/features/organizations/users/OrgUsersTable.svelte
    • web-admin/src/features/organizations/users/OrgUsersTableActionsCell.svelte
    • web-admin/src/features/organizations/users/OrgUsersTableRoleCell.svelte
    • web-admin/src/features/organizations/users/OrgUsersTableUserCompositeCell.svelte
    • web-admin/src/routes/[organization]/-/users/+layout.svelte
    • web-admin/src/routes/[organization]/-/users/+page.svelte
    • web-common/src/components/chip/core/Chip.svelte
    • web-common/src/components/menu/OrgUsersFilters.svelte
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@bito-code-review
Copy link

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Feature Improvement - UI Role Enhancements

AvatarListItem.svelte - Added a role property and guest chip to visually indicate user roles.

OrgUsersTable.svelte - Integrated currentUserRole and adjusted table rendering for clearer role management.

OrgUsersTableActionsCell.svelte - Enhanced dropdown actions with role-based access controls for managing user actions.

OrgUsersTableRoleCell.svelte - Refined role cell logic to support guest upgrade and role selection with improved UI feedback.

OrgUsersTableUserCompositeCell.svelte - Updated the composite cell to pass the role property to the avatar component.

+layout.svelte - Updated the page title from 'Users' to 'Manage users' to better reflect the page purpose.

+page.svelte - Enhanced the users page with filtering, search improvements, and refined table integration for role display.

Chip.svelte - Extended the chip component to support a 'guest' type style, aligning it with role-specific visual cues.

New Feature - New Role Upgrade Components

OrgUpgradeGuestConfirmDialog.svelte - Introduced a new dialog component to confirm the upgrade of a guest user to a higher role.

OrgUsersFilters.svelte - Added a filter menu component that allows users to sort and view organization members based on their roles.

@ericokuma
Copy link
Contributor

Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code generally looks good! I left two comments, and I also left a couple notes in the UXQA doc (1, 2).

I'll defer to @ericokuma to approve from the Product perspective.

@ericokuma
Copy link
Contributor

Looks good. Some nits are around consistent font sizes in comparison to the designs!

@lovincyrus lovincyrus merged commit 95b32f7 into main Apr 29, 2025
9 checks passed
@lovincyrus lovincyrus deleted the cyrus/org-user-page-v2 branch April 29, 2025 16:37
@ericokuma ericokuma changed the title Organization level users page improvements [ENG-610] Organization level users page improvements May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User Management v2: Updates to the org user page

4 participants