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

refactor: [M3-9389] - Move Support queries #11904

Merged
merged 4 commits into from
Mar 28, 2025

Conversation

carrillo-erik
Copy link
Contributor

@carrillo-erik carrillo-erik commented Mar 21, 2025

Description 📝

Migrates Support-related queries, as well as all dependencies, under the @linode/queries package.

Changes 🔄

  • Creates new support/ directory in the @linode/queries package with the following structure:
support/
|__ index.ts
|__ support.ts
  • Updates import paths throughout packages/manager.
  • Removed a redundant default export from TicketList.tsx.

How to test 🧪

  • Rely on e2e tests and CI pipeline to ensure changes do not break the application.
  • No changes to the UI as a result of this PR.

Verification steps

  • Verify that the Support feature works as expected.
  • Verify that other major flows continue to work as expected.
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


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@carrillo-erik carrillo-erik self-assigned this Mar 21, 2025
@carrillo-erik carrillo-erik requested a review from a team as a code owner March 21, 2025 06:35
@carrillo-erik carrillo-erik requested review from bnussman-akamai and cliu-akamai and removed request for a team March 21, 2025 06:35
SupportReply,
SupportTicket,
TicketRequest,
} from '@linode/api-v4/lib/support';
Copy link
Member

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.

Suggested change
} from '@linode/api-v4/lib/support';
} from '@linode/api-v4';

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 533 passing tests on test run #3 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing533 Passing4 Skipped99m 49s

Filter,
Params,
ResourcePage,
} from '@linode/api-v4/lib/types';
Copy link
Member

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

Suggested change
} from '@linode/api-v4/lib/types';
} from '@linode/api-v4';

Comment on lines +31 to +47
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],
}),
});
Copy link
Member

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

Copy link
Contributor

@coliu-akamai coliu-akamai left a 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)

@coliu-akamai coliu-akamai added Approved Multiple approvals and ready to merge! and removed Ready for Review labels Mar 27, 2025
@carrillo-erik carrillo-erik merged commit 3b09800 into linode:develop Mar 28, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Modularization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants