Skip to content

staging hotfix: [UIE-9137] - AssignSelectedRolesDrawer user selection state issue - #12748

Merged
abailly-akamai merged 2 commits into
linode:stagingfrom
abailly-akamai:UIE-9137
Aug 22, 2025
Merged

staging hotfix: [UIE-9137] - AssignSelectedRolesDrawer user selection state issue#12748
abailly-akamai merged 2 commits into
linode:stagingfrom
abailly-akamai:UIE-9137

Conversation

@abailly-akamai

@abailly-akamai abailly-akamai commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

Description 📝

This PR fixes a couple issues with the behavior of the AssignSelectedRolesDrawer component - specifically the user selection.

Prior to this fix we would encounter two issues:

  • After an initial user selection from the drop down, pressing the "Assign" CTA would result in a validation error that would require a subsequent selection to allow the form to submit
  • The form would over-fetch: when selecting a user from the dropdown, we could see another unnecessary fetch to the account/users endpoint due to the filter changing based on the value.

While a dedicated state input state was the right model, there was no need for detaching the actual username from the form state

Changes 🔄

  • Clean up AssignSelectedRolesDrawer state 👉 rely on form state for actual username
  • Comment behavior

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

Target release date 🗓️ 8/26/2025

Preview 📷

Screenshot 2025-08-22 at 13 48 08

How to test 🧪

Prerequisites

IAM account with permission to assign roles to another user

Reproduction steps

  • Go to /iam/roles
  • Click Assign Role button next to any role
  • Select any username in the user selector
    • ⛔ Notice account/users is being refetched
  • Click the Assign button
    • ⛔ Notice inline validation error

Verification steps

  • Go to /iam/roles
  • Click Assign Role button next to any role
  • Select any username in the user selector
    • ✅ Notice account/users is NOT being refetched
  • Click the Assign button
    • ✅ Notice NO inline validation error and form submits

Also confirm fetching by any username still works ✅

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 tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@abailly-akamai
abailly-akamai marked this pull request as ready for review August 22, 2025 11:54
@abailly-akamai
abailly-akamai requested a review from a team as a code owner August 22, 2025 11:54
@abailly-akamai
abailly-akamai requested review from aaleksee-akamai, dwiley-akamai, hasyed-akamai and mpolotsk-akamai and removed request for a team August 22, 2025 11:54
@aaleksee-akamai

Copy link
Copy Markdown
Contributor

looks good, the issue has beed resolved, thanks @abailly-akamai

@kwojtowiakamai kwojtowiakamai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good. Thanks for fixing it so quickly! @abailly-akamai

@linode-gh-bot

Copy link
Copy Markdown

Cloud Manager UI test results

🎉 735 passing tests on test run #2 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing735 Passing4 Skipped124m 51s

@coliu-akamai coliu-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ confirmed no more refetching
✅ confirmed fix

thanks @abailly-akamai!

@github-project-automation github-project-automation Bot moved this from Review to Approved in Cloud Manager Aug 22, 2025
@abailly-akamai
abailly-akamai merged commit 0b6a4ab into linode:staging Aug 22, 2025
35 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Merged in Cloud Manager Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants