-
Notifications
You must be signed in to change notification settings - Fork 373
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-9389] - Move Support queries #11904
Conversation
SupportReply, | ||
SupportTicket, | ||
TicketRequest, | ||
} from '@linode/api-v4/lib/support'; |
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.
Optional: clean up all of the imports.
} from '@linode/api-v4/lib/support'; | |
} from '@linode/api-v4'; |
Cloud Manager UI test results🎉 533 passing tests on test run #3 ↗︎
|
Filter, | ||
Params, | ||
ResourcePage, | ||
} from '@linode/api-v4/lib/types'; |
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.
Optional: clean up these imports
} from '@linode/api-v4/lib/types'; | |
} from '@linode/api-v4'; |
export const supportQueries = createQueryKeys('support', { | ||
ticket: (id: number) => ({ | ||
contextQueries: { | ||
replies: { | ||
queryFn: ({ pageParam }) => | ||
getTicketReplies(id, { page: pageParam as number, page_size: 25 }), | ||
queryKey: null, | ||
}, | ||
}, | ||
queryFn: () => getTicket(id), | ||
queryKey: [id], | ||
}), | ||
tickets: (params: Params, filter: Filter) => ({ | ||
queryFn: () => getTickets(params, filter), | ||
queryKey: [params, filter], | ||
}), | ||
}); |
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.
Optional: I don't remember exactly where we landed on this file-structure wise, but could move the query key factory into a different file just to clean up this file a bit
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, thank you!
✅ flows in general
✅ support feature (did not test updating/creating a support ticket - didn't want to bother our support team)
Description 📝
Migrates Support-related queries, as well as all dependencies, under the
@linode/queries
package.Changes 🔄
support/
directory in the@linode/queries
package with the following structure:packages/manager
.TicketList.tsx
.How to test 🧪
Verification steps
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 ✅