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

perf: fetch data server side for /settings/webhooks #20583

Merged
merged 6 commits into from
Apr 7, 2025

Conversation

hbjORbj
Copy link
Contributor

@hbjORbj hbjORbj commented Apr 7, 2025

What does this PR do?

  • Fetch data for /settings/webhooks server-side

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A - I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Screen.Recording.2025-04-07.at.6.14.47.AM.mov

@graphite-app graphite-app bot requested a review from a team April 7, 2025 10:10
@hbjORbj hbjORbj changed the title perf: fetch data server side settings webhooks perf: fetch data server side for /settings/webhooks Apr 7, 2025
Copy link

graphite-app bot commented Apr 7, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (04/07/25)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link

vercel bot commented Apr 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Apr 7, 2025 6:02pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Apr 7, 2025 6:02pm

@keithwillcode keithwillcode added core area: core, team members only foundation labels Apr 7, 2025
@dosubot dosubot bot added performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive webhooks area: webhooks, callback, webhook payload labels Apr 7, 2025
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
import { SkeletonLoader } from "@calcom/features/webhooks/pages/webhooks-view";

export default function Loading() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this while loading

Screenshot 2025-04-07 at 5 53 56 AM

Comment on lines -36 to -38
const { data, isPending } = trpc.viewer.webhook.getByViewer.useQuery(undefined, {
enabled: session.status === "authenticated",
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to RSC (/webhooks/page.tsx)

Copy link
Contributor

github-actions bot commented Apr 7, 2025

E2E results are ready!

Copy link
Contributor

@keithwillcode keithwillcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested:

  • Switching between pages to ensure data is loaded via RSC call
  • No extra tRPC call is made on client-side
  • Can remove, edit and delete webhooks

@keithwillcode keithwillcode enabled auto-merge (squash) April 7, 2025 18:02
@keithwillcode keithwillcode merged commit 134086f into main Apr 7, 2025
38 checks passed
@keithwillcode keithwillcode deleted the perf/fetch-data-server-side-settings-webhooks branch April 7, 2025 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only foundation performance area: performance, page load, slow, slow endpoints, loading screen, unresponsive ready-for-e2e webhooks area: webhooks, callback, webhook payload
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants