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: support deprecated draftMode preview URL config #2137

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented Nov 11, 2024

Should fix #2136, and will now console.warn if the deprecated previewUrl.draftMode is used, and nudge towards using previewUrl.previewMode 🙌

@stipsan stipsan requested a review from a team as a code owner November 11, 2024 23:17
Copy link

vercel bot commented Nov 11, 2024

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

Name Status Preview Comments Updated (UTC)
live-visual-editing-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 11:19pm
visual-editing-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 11:19pm
visual-editing-next-with-i18n ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 11:19pm
visual-editing-nuxt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 11:19pm
visual-editing-page-builder-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 11:19pm
visual-editing-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 11:19pm
visual-editing-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 11:19pm
visual-editing-svelte ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 11:19pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
visual-editing-astro ⬜️ Skipped (Inspect) Nov 11, 2024 11:19pm
visual-editing-remix ⬜️ Skipped (Inspect) Nov 11, 2024 11:19pm

Copy link
Member

@rdunk rdunk left a comment

Choose a reason for hiding this comment

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

This looks good to me, as an aside, I wonder if the comment here needs updating:

https://github.com/sanity-io/visual-editing/blob/main/packages/preview-url-secret/src/types.ts#L90

 * @deprecated - `previewMode` is deprecated, use `draftMode.shareAccess` instead

Should this just be:

 * @deprecated - use `previewMode.shareAccess` instead

@stipsan stipsan merged commit c98993e into main Nov 11, 2024
20 checks passed
@stipsan stipsan deleted the support-legacy-draftMode branch November 11, 2024 23:28
@ecospark ecospark bot mentioned this pull request Nov 11, 2024
@stipsan
Copy link
Member Author

stipsan commented Nov 12, 2024

@rdunk Great catch! 🤦‍♂️ fixed on main! 🙌

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.

Preview URL Sharing feature not showing up
2 participants