upcoming: Enable Linode Interface query only when Delete Interface dialog is open and update Dialog title - #11881
Merged
coliu-akamai merged 4 commits intoMar 20, 2025
Conversation
coliu-akamai
marked this pull request as ready for review
March 18, 2025 21:42
coliu-akamai
requested review from
bnussman-akamai,
cliu-akamai and
hkhalil-akamai
and removed request for
a team
March 18, 2025 21:42
bnussman-akamai
approved these changes
Mar 18, 2025
bnussman-akamai
left a comment
Member
There was a problem hiding this comment.
Thanks for fixing my mistake! This type of data-fetching bug is far too common 😖
hkhalil-akamai
approved these changes
Mar 19, 2025
| onClose={onClose} | ||
| open={open} | ||
| title={`Delete ${type} Interface?`} | ||
| title={`Delete ${type} Interface (ID: ${interfaceId})?`} |
Contributor
There was a problem hiding this comment.
This change is not mentioned in the PR description; was it meant to be included here?
Contributor
I've been thinking about this pattern which will make this type of bug easier to avoid: export const useLinodeInterfaceQuery = (
linodeId: number,
interfaceId: number | undefined,
enabled: boolean = true;
) => {
return useQuery<LinodeInterface, APIError[]>({
...linodeQueries
.linode(linodeId)
._ctx.interfaces._ctx.interface(interfaceId ?? -1),
enabled && interfaceId !== undefined,
});
};const {
...
} = useLinodeInterfaceQuery(
linodeId,
interfaceId,
open
); |
Member
|
@hkhalil-akamai Yeah, that would work. It does feel a bit weird to pass an |
Contributor
Author
|
switched to your suggestion @hkhalil-akamai - ty! |
Cloud Manager UI test results🎉 539 passing tests on test run #4 ↗︎
|
This was referenced Apr 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description 📝
Changes 🔄
Preview 📷
How to test 🧪
Using devenv
Have a linode using new interfaces
Reproduction steps
Verification
Author Checklists
As an Author, to speed up the review process, I 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
As an Author, before moving this PR from Draft to Open, I confirmed ✅