-
Notifications
You must be signed in to change notification settings - Fork 332
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
upcoming: [M3-7879] - Linode Create Refactor - Part 4 - Access #10308
upcoming: [M3-7879] - Linode Create Refactor - Part 4 - Access #10308
Conversation
return ( | ||
<Paper> | ||
<React.Suspense | ||
fallback={<Skeleton sx={{ height: '89px', maxWidth: '416px' }} />} |
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.
This is how we use to handle this component. We lazy load it because it is heavy. I switched the fallback
to a Skeleton that is the same size as the PasswordInput
so that content won't have a chance to shift
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.
This is just a newer, cleaner, simpler version of packages/manager/src/components/AccessPanel/AccessPanel.tsx
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.
Clean as π§
return ( | ||
<Paper> | ||
<React.Suspense | ||
fallback={<Skeleton sx={{ height: '89px', maxWidth: '416px' }} />} |
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.
What are you thoughts of setting 416 as a constant and use it where we're setting the maxWidth for inputs in other places to? If that ever changes and someone forgets to update this, the skeleton will be off
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.
4d81095 It now pulls from an existing constant. Should I make the change globally where 416
is hardcoded?
export const Access = () => { | ||
const { control } = useFormContext<CreateLinodeRequest>(); | ||
|
||
const isLinodeCreateRestricted = useRestrictedGlobalGrantCheck({ |
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.
Nit: We typically have been calling the variable for this hook is{Resource}ReadOnly
. I'm open to whatever, but we should probably find a common convention
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.
We could force that naming convention through the hook
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.
Access.test.tsx
passes β
Disabled fields for user without proper grants β
Creation goes through with expected inputs β
Code review β
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.
No additional comments after code-review and manual testing... great work @bnussman-akamai!
Description π
Preview π·
How to test π§ͺ
You can test via the preview link if you want!
Linode Create v2
feature flag is toggled on using our dev toolsAs an Author I have considered π€