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

Extend draftmode to support arbitrary context data #75330

Closed

Conversation

kshehadeh
Copy link
Contributor

@kshehadeh kshehadeh commented Jan 26, 2025

What?

Add support for storing contextual data with enabled draft mode.

Why?

To better support large sites that deploy the majority of their site statically but need context to be associated with a preview mode.

How?

By storing adhoc data in a separate cookie that is read by the draftMode API and does not require the use of independenlty using the cookies dynamic api (which deopts requests from static generation)

Fixes #75341

@ijjk
Copy link
Member

ijjk commented Jan 26, 2025

Allow CI Workflow Run

  • approve CI run for commit: 5106814

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@kshehadeh kshehadeh marked this pull request as draft January 26, 2025 15:39
@ijjk ijjk added the Documentation Related to Next.js' official documentation. label Jan 26, 2025
@ijjk ijjk added the tests label Jan 26, 2025
@kshehadeh
Copy link
Contributor Author

Not on the roadmap

@kshehadeh kshehadeh closed this Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Related to Next.js' official documentation. tests type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants