Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [UIE-8138] - IAM RBAC: add new assigned roles table component (part 1) #11533

Conversation

aaleksee-akamai
Copy link
Contributor

Description 📝

IAM RBAC - new assigned roles table component.
figma

Changes 🔄

List any change(s) relevant to the reviewer.

  • Table for the assigned roles
  • Filtering roles

do not include (will be introduced in the next PR):

  • Deleting roles or any action in the action menu
  • Deleting chips with entities
  • Permissions

Target release date 🗓️

1/28/25 (dev)

Preview 📷

Include a screenshot or screen recording of the change.

🔒 Use the Mask Sensitive Data setting for security.

💡 Use <video src="" /> tag when including recordings in table.

Before After
📷 image

How to test 🧪

Prerequisites

(How to setup test environment)

  • Ensure the Identity and Access Beta flag is enabled in dev tools
  • Ensure the MSW is enabled in dev tools
  • Click on the any username in the users table and go to the tab Assigned Roles or click on the user's menu View User Roles

Verification steps

(How to verify changes)

  • Confirm table renders.
  • Confirm table renders data according to the applied filters
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@aaleksee-akamai aaleksee-akamai requested a review from a team as a code owner January 17, 2025 12:10
@aaleksee-akamai aaleksee-akamai requested review from bnussman-akamai and carrillo-erik and removed request for a team January 17, 2025 12:10
@aaleksee-akamai aaleksee-akamai force-pushed the UIE-8138-iam-rbac-assigned-roles-table-part-1 branch from 73028d5 to bd4e6aa Compare January 17, 2025 12:13
@aaleksee-akamai aaleksee-akamai self-assigned this Jan 17, 2025
@@ -94,7 +94,7 @@ export const UserDetailsLanding = () => {
<UserDetails />
</SafeTabPanel>
<SafeTabPanel index={++idx}>
<UserRoles assignedRoles={assignedRoles} />
<UserRoles />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bnussman-akamai , I've decided to move it to the component as you previously suggested. I'll do the same for UserEntities later

@@ -9,7 +9,7 @@ import { CollapsibleRow } from './CollapsibleRow';
export interface TableItem {
InnerTable: JSX.Element;
OuterTableCells: JSX.Element;
id: number;
id: number | string;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don’t have any data that can be used as an ID of type number. Only role names are unique, so we need to add a string type here

Copy link

github-actions bot commented Jan 17, 2025

Coverage Report:
Base Coverage: 87.17%
Current Coverage: 87.17%

@cpathipa cpathipa requested review from cpathipa and removed request for carrillo-erik January 17, 2025 15:13
Copy link
Contributor

@cpathipa cpathipa left a comment

Choose a reason for hiding this comment

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

Overall, the component looks good! and well structured. I've left a few comments to improve the AssignedRolesTable. Given its size, we could move some util functions to a utilities.ts file to keep the component more focused and readable. Additionally, I recommend adding explicit return types and memoization where needed for better type safety.

@aaleksee-akamai aaleksee-akamai force-pushed the UIE-8138-iam-rbac-assigned-roles-table-part-1 branch from bd4e6aa to 74f2dc6 Compare January 20, 2025 11:34
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🔺 2 failing tests on test run #3 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
2 Failing472 Passing2 Skipped112m 23s

Details

Failing Tests
SpecTest
cloudpulse-navigation.spec.tsCloudPulse navigation » can navigate to Cloudpulse landing page
smoke-linode-landing-table.spec.tslinode landing checks » checks the landing page side menu items

Troubleshooting

Use this command to re-run the failing tests:

yarn cy:run -s "cypress/e2e/core/cloudpulse/cloudpulse-navigation.spec.ts,cypress/e2e/core/linodes/smoke-linode-landing-table.spec.ts"

Copy link
Contributor

@cpathipa cpathipa left a comment

Choose a reason for hiding this comment

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

@aaleksee-akamai Thank you for addressing all the feedback. LGTM!

@cpathipa cpathipa added Approved Multiple approvals and ready to merge! and removed Requires Changes labels Jan 23, 2025
@cpathipa cpathipa merged commit 6575594 into linode:develop Jan 23, 2025
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! IAM (Identity & Access Management)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants