-
Notifications
You must be signed in to change notification settings - Fork 367
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: [M3-7687] - Refactor & Improve LinodeActionMenu
Restricted User Experience
#10199
Conversation
onClick: handlePowerAction, | ||
title: linodeStatus === 'running' ? 'Power Off' : 'Power On', | ||
tooltipAction: 'modify', | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I went with this config approach to remove some of the redundancies in the original. Open for discussion.
LinodeActionMenu
Restricted User Experience
Coverage Report: ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, tested and looks good. Left some minor feedback and discussion.
packages/manager/src/features/Linodes/LinodesLanding/LinodeActionMenu/LinodeActionMenu.test.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodesLanding/LinodeActionMenu/LinodeActionMenu.test.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodesLanding/LinodeActionMenu/LinodeActionMenu.tsx
Outdated
Show resolved
Hide resolved
...s/manager/src/features/Linodes/LinodesLanding/LinodeActionMenu/useLinodeActionVisibility.tsx
Outdated
Show resolved
Hide resolved
…ionMenu/LinodeActionMenu.test.tsx Co-authored-by: Hussain Khalil <122488130+hkhalil-akamai@users.noreply.github.com>
…ionMenu/LinodeActionMenu.test.tsx Co-authored-by: Hussain Khalil <122488130+hkhalil-akamai@users.noreply.github.com>
packages/manager/src/features/Linodes/LinodesLanding/LinodeActionMenu/LinodeActionMenu.tsx
Outdated
Show resolved
Hide resolved
Thanks @bnussman-akamai |
Note
There's more work to do for Linodes to improve the user experience for restricted users, but I've decided to breakup the work in separate PRs
Description 📝
This refactors the
LinodeActionMenu
while providing disabled tooltips for action items.Tooltips specifically designed for disabled buttons will persist within action menus. These tooltips prove valuable in scenarios where a restricted user has permission to delete their personal resources but lacks the permission to delete those belonging to the admin user. In such cases, we refrain from displaying notices on the page.
Changes 🔄
List any change relevant to the reviewer.
LinodeActionMenu
directory for compartmentalizing filestype ActionType
getRestrictedResourceText
for instances where we don't want to be so verbosebuildQueryStringForLinodeClone
into a util fileTarget release date 🗓️
March 4, 2024
Preview 📷
How to test 🧪
Prerequisites
(How to setup test environment)
Read Only
for everythingReproduction steps
(How to reproduce the issue, if applicable)
You don't have permission to modify this Linode
Verification steps
(How to verify changes)
read_write
of Linodes for restricted user:true
This action is unavailable while your Linode is offline.
As an Author I have considered 🤔
Check all that apply