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

feat!: add Content Source Map functionality #284

Closed
wants to merge 1 commit into from
Closed

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented May 3, 2023

No description provided.

@vercel
Copy link

vercel bot commented May 3, 2023

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

Name Status Preview Comments Updated (UTC)
nextjs-blog-cms-sanity-v3 ❌ Failed (Inspect) May 23, 2023 11:53pm
nextjs-blog-cms-sanity-v3-without-csm ❌ Failed (Inspect) May 23, 2023 11:53pm
nextjs-blog-cms-sanity-v3-without-env ❌ Failed (Inspect) May 23, 2023 11:53pm

@socket-security
Copy link

socket-security bot commented May 22, 2023

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

➕ Added Package Capability Access +/- Transitive Count Publisher
sanity-plugin-iframe-pane@2.3.1 None +18 sanity-io
⬆️ Updated Package Version Diff Added Capability Access +/- Transitive Count Publisher
sanity@3.9.1 3.11.1...3.9.1 None +16/-15 rexxars
next-sanity@4.4.0-perspective.2 4.3.2...4.4.0-perspective.2 None +22/-16 stipsan
@sanity/vision@3.9.1 3.11.1...3.9.1 None +0/-0 rexxars

@kmelve
Copy link
Member

kmelve commented May 22, 2023

📝 Changed routes:

/ /posts/[slug]
Screenshot of /
(view full size)
Screenshot of /posts/[slug]
(view full size)

And 3 other routes:

Commit 71aeabdc19c574fefac401f7a420f40ee1edd7f0 (https://nextjs-blog-cms-sanity-v3-without-praygalqz.sanity.build).

/**
* LiveStoreProvider requires Content Source Maps in order to preview in real-time, as you type, changes as they happen.
* If Visual Editing isn't used, and the amount of documents isn't in the tens of thousands then:
* import {GroqStoreProvider} from 'next-sanity/preview-groq-store'
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean that after merging this PR, projects without visual editing enabled will have to make this change for live preview to work? Should this perhaps be called out in the readme?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ooops didn't realise this PR wasn't market as draft. I'm still working on this and trying to find a good way to switch between the modes. And find a good balance between a live preview that works for everyone, and a live preview that still works once visual editing is enabled 🙌
Setting the PR back to draft

@@ -19,3 +19,6 @@ export const useCdn = process.env.SANITY_REVALIDATE_SECRET
// This is the document id used for the preview secret that's stored in your dataset.
// The secret protects against unauthorized access to your draft content and have a lifetime of 60 minutes, to protect against bruteforcing.
export const previewSecretId: `${string}.${string}` = 'preview.secret'

// THe route path to where the Studio is embedded
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// THe route path to where the Studio is embedded
// The route path to where the Studio is embedded

lib/sanity.client.ts Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants