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

fix(schedule-publishing): avoid polling in upsell mode #6670

Merged
merged 1 commit into from
May 16, 2024
Merged

Conversation

pedrobonamin
Copy link
Contributor

Description

This PR updates how the usePollSchedules hook works.
If the client is in upsell mode we have no need to poll the schedules data, given it won't change for them. We do have the need to query it when the document loads as we need to show the upsell UI at document level if that document has a schedule.

This is done by changing the options passed to the useSwr hook.
https://swr.vercel.app/docs/revalidation#disable-automatic-revalidations

 {
    refreshInterval: undefined,
    revalidateOnFocus: false,
    revalidateIfStale: false,
    revalidateOnReconnect: false
}

What to review

Testing

Notes for release

@pedrobonamin pedrobonamin requested review from a team and sjelfull and removed request for a team May 15, 2024 09:22
Copy link

vercel bot commented May 15, 2024

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

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2024 6:29am
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2024 6:29am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2024 6:29am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview May 16, 2024 6:29am

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented May 15, 2024

Component Testing Report Updated May 16, 2024 6:33 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 34s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 26s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 31s 11 7 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 35s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 6s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 5s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 6s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 20s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 14s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 22s 9 0 0

@pedrobonamin pedrobonamin added this pull request to the merge queue May 16, 2024
Merged via the queue into next with commit 87889d1 May 16, 2024
40 checks passed
@pedrobonamin pedrobonamin deleted the edx-1310 branch May 16, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants