-
Notifications
You must be signed in to change notification settings - Fork 361
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
refactor: [M3-6913] Replace Select with Autocomplete in: linodes #10725
refactor: [M3-6913] Replace Select with Autocomplete in: linodes #10725
Conversation
@harsh-akamai It looks like there are conflicts that need to resolved. |
I still need to finish confirming the rest of the code changes look good, but the Cypress failures were related to Volumes only, so e2es are looking good otherwise. (We can merge in It looks like the last unit test failures are coming from |
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.
Test passed
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.
@harsh-akamai, thanks for doing this and keeping up with the test changes in all the various components!
Overall, I didn't see any major regressions. I pointed out a couple of places where we're seeing slightly different behavior from prod, as well as some props that we can clean up a little.
And installing the recommended VSCode extensions I linked and cleaning up the linting warnings also ensures our code is consistently readable.
packages/manager/src/features/Linodes/LinodesCreate/VPCPanel.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodesCreate/VPCPanel.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodesCreate/VPCPanel.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.tsx
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodesDetail/LinodeRescue/DeviceSelection.tsx
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodesDetail/LinodeSettings/InterfaceSelect.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Linodes/LinodesDetail/LinodeConfigs/LinodeConfigDialog.tsx
Outdated
Show resolved
Hide resolved
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.
Thanks for the clean up!
There's an unintended crash in the VPC Panel selection as a result of how we're handling lack of selection that we should fix, and it would be helpful to merge in the latest from develop
before your next commit in order to get e2e test passing (all just Volume failures fixed in develop
).
Once that feedback is addressed, I'll approve.
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! I've left a few comments for minor adjustments; otherwise, things LGTM. I believe these efforts have already been addressed in the Linode Create V2 as a long-term solution.
CC: @bnussman
const vpcDropdownOptions: DropdownOption[] = vpcs.reduce( | ||
(accumulator, vpc) => { | ||
return vpc.region === region | ||
? [...accumulator, { label: vpc.label, value: vpc.id }] | ||
: accumulator; | ||
}, | ||
[] | ||
); |
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.
Can we wrap this in useCallback 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.
I believe you meant useMemo? It has been implemented in 20d7eea.
noMarginTop | ||
onChange={() => null} | ||
placeholder="Finnix Media" | ||
options={[]} |
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.
Is it intentional change, passing empty array as options ?
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.
Yes. This input field has been disabled by default, which is why options is an empty array.
@@ -9,3 +9,13 @@ export const lishLink = ( | |||
) => { | |||
return `ssh -t ${username}@lish-${region}.linode.com ${linodeLabel}`; | |||
}; | |||
|
|||
export const getSelectedDeviceOption = ( |
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.
Can we have test coverage for this util ?
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.
Added in 12cb9d8.
…side the Linode feature
…ons, preventing unwanted re-renders
…he VPC dropdown list
Description 📝
We want to get rid of our dependency on react-select for accessibility reasons and to consolidate our usage of third-party libraries.
Changes 🔄
How to test 🧪
Verification steps
(How to verify changes)
As an Author I have considered 🤔
Check all that apply