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

upcoming: [M3-7879] - Linode Create Refactor - Part 4 - Access #10308

Conversation

bnussman-akamai
Copy link
Contributor

@bnussman-akamai bnussman-akamai commented Mar 22, 2024

Description πŸ“

  • Adds the Password and SSH Key section to the new Linode Create flow πŸ†•
  • Fixes issue where there was too much space between the general error and the tabs πŸ”§

Preview πŸ“·

Screenshot 2024-03-22 at 2 26 30β€―PM

How to test πŸ§ͺ

You can test via the preview link if you want!

  • Check out this PR
  • Make sure the Linode Create v2 feature flag is toggled on using our dev tools
  • Go to http://localhost:3000/linodes/create and test general functionality
  • Check my code πŸ‘¨β€πŸ’»
  • Make sure my unit tests are sufficient πŸ§ͺ

As an Author I have 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

@bnussman-akamai bnussman-akamai self-assigned this Mar 22, 2024
@bnussman-akamai bnussman-akamai requested a review from a team as a code owner March 22, 2024 18:29
@bnussman-akamai bnussman-akamai requested review from dwiley-akamai and hana-linode and removed request for a team March 22, 2024 18:29
return (
<Paper>
<React.Suspense
fallback={<Skeleton sx={{ height: '89px', maxWidth: '416px' }} />}
Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link

github-actions bot commented Mar 22, 2024

Coverage Report: βœ…
Base Coverage: 81.64%
Current Coverage: 81.64%

Copy link
Contributor

@jaalah jaalah left a 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' }} />}
Copy link
Contributor

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

Copy link
Contributor Author

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({
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

@dwiley-akamai dwiley-akamai left a 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 βœ…

@bnussman-akamai bnussman-akamai added Add'tl Approval Needed Waiting on another approval! and removed Ready for Review labels Mar 25, 2024
Copy link
Contributor

@hkhalil-akamai hkhalil-akamai left a 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!

@bnussman-akamai bnussman-akamai merged commit d8adf13 into linode:develop Mar 25, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants