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: SvelteKit previews #14

Merged
merged 5 commits into from
Oct 3, 2023
Merged

feat: SvelteKit previews #14

merged 5 commits into from
Oct 3, 2023

Conversation

angeloashmore
Copy link
Member

@angeloashmore angeloashmore commented Oct 3, 2023

Types of changes

  • Chore (a non-breaking change which is related to package maintenance)
  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This PR adds support for Prismic previews in SvelteKit. It adds a @prismicio/svelte/kit entry, which provides components and helpers to support previews.

  • <PrismicPreview>: Renders the Prismic toolbar and adds SvelteKit-specific preview event handlers to update page data.
  • enableAutoPreviews(): Configures a Prismic client to support SvelteKit-style previews.
  • redirectToPreviewURL(): Creates a Response object to redirect a content writer to a previewed document.

Documentation on @prismicio/svelte/kit will be available soon.

Checklist:

  • My change requires an update to the official documentation.
  • All TSDoc comments are up-to-date and new ones have been added where necessary.
  • All new and existing tests are passing.

🦑

@codecov-commenter
Copy link

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (65b0e7f) 92.67% compared to head (e67132c) 98.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
+ Coverage   92.67%   98.00%   +5.32%     
==========================================
  Files          11       11              
  Lines         601      601              
==========================================
+ Hits          557      589      +32     
+ Misses         44       12      -32     

see 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@angeloashmore angeloashmore merged commit 3460881 into master Oct 3, 2023
12 checks passed
@angeloashmore angeloashmore deleted the aa/kit-previews branch October 3, 2023 22:43
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.

None yet

2 participants