-
Notifications
You must be signed in to change notification settings - Fork 364
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-6263] - MUI v5 Migration - SRC > Features > EntityTransfers #9582
refactor: [M3-6263] - MUI v5 Migration - SRC > Features > EntityTransfers #9582
Conversation
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.
Looks good! Approving pending some cleanup
packages/manager/src/features/EntityTransfers/EntityTransfersCreate/TransferHeader.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/EntityTransfers/EntityTransfersCreate/TransferTable.styles.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/EntityTransfers/EntityTransfersCreate/TransferTable.styles.ts
Outdated
Show resolved
Hide resolved
...s/manager/src/features/EntityTransfers/EntityTransfersLanding/ConfirmTransferDialog.test.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/EntityTransfers/EntityTransfersLanding/TransferControls.styles.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/EntityTransfers/RenderTransferRow.styles.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/EntityTransfers/RenderTransferRow.styles.ts
Outdated
Show resolved
Hide resolved
...anager/src/features/Kubernetes/KubernetesClusterDetail/NodePoolsDisplay/NodePoolsDisplay.tsx
Show resolved
Hide resolved
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.
oops i missed this was a draft - comments still apply tho :)
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.
Awesome job! Just a few things:
When there are no linodes in the /account/service-transfers/create
page, the table column widths are different on your branch vs prod:
Also, it's not really easy to screenshot so I've only included an image of the area, not a comparison, but the Service Transfer Summary area on the same page may be slightly shifted? Will say though that sometimes I've come across spacing issues like this that just... disappeared the next day (???) so it may not be anything, but worth double checking:
...es/manager/src/features/EntityTransfers/EntityTransfersCreate/EntityTransferCreate.styles.ts
Outdated
Show resolved
Hide resolved
...ges/manager/src/features/EntityTransfers/EntityTransfersCreate/TransferCheckoutBar.styles.ts
Show resolved
Hide resolved
...s/manager/src/features/EntityTransfers/EntityTransfersLanding/ConfirmTransferDialog.test.tsx
Outdated
Show resolved
Hide resolved
label: 'StyledDebouncedSearchTextField', | ||
})(({ theme }) => ({ | ||
marginBottom: theme.spacing(0.5), | ||
maxWidth: 556, |
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 wonder how they got this specific of a number
packages/manager/src/features/EntityTransfers/EntityTransfersLanding/TransferControls.styles.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/EntityTransfers/EntityTransfersLanding/TransferControls.styles.ts
Outdated
Show resolved
Hide resolved
packages/manager/src/features/EntityTransfers/EntityTransfersLanding/TransferControls.styles.ts
Outdated
Show resolved
Hide resolved
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.
Yeah its a little wider without data, but as soon as data is added, it expands to the width I currently have. Its a minor difference but I wouldn't consider it a regression. |
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.
Ok thanks for the clarification, approving in that case 🎉
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.
acceptEntityTransfer(token) | ||
.then(() => { | ||
// @analytics | ||
if (data?.entities) { | ||
const entityCount = countByEntity(data?.entities); | ||
sendEntityTransferReceiveEvent(entityCount); | ||
} | ||
// Update the received transfer table since we're already on the landing page | ||
queryClient.invalidateQueries({ | ||
predicate: (query) => | ||
query.queryKey[0] === queryKey && | ||
query.queryKey[2] === TRANSFER_FILTERS.received, | ||
}); | ||
onClose(); | ||
setSubmitting(false); | ||
enqueueSnackbar('Transfer accepted successfully.', { | ||
variant: 'success', | ||
}); |
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 to have: we could simplify this with async/await's
@cpathipa if you're using the MSW, I'm not too sure if the search bar filters the MSW linodes: I'm getting the same behavior on the develop branch, where I can't search/filter MSW linodes. However, I tried turning off the MSW and creating some linodes, and the searchbar seemed to work fine for the actual linodes -- could you confirm this behavior on your end? |
@coliu-akamai My bad, I didn't realize MSW was enabled locally. Confirming that the search bar is working as I expected. and approved the PR with pending minor feedback on using async/await's. |
…fers (#9582) * initial migration commit * finished EntityTransfers/ and EntityTransfersCreate/ * Partly done EntityTransfersLanding directory * finished css migration, have not tested yet * Added changeset: MUI v5 Migration - SRC > Features > EntityTransfers * removed test code * testing formating issues * fixed inconsistent styling issues * fixed pr suggestions --------- Co-authored-by: TylerWJ <tylerwjones99@gmail.com>
Description 📝
MUI v5 CSS migration for SRC > Features > EntityTransfers
Major Changes 🔄
React.FC
or `Props
to{ComponentName}Props
.CombinedProps
if it's directly referencingProps
with nothing additionalmakeStyles
for newstyled API
.export
component inline and removedexport default {ComponentName}
at bottom of file.Preview 📷
How to test 🧪