Skip to content

Storyblok preview state#1748

Open
eleanorreem wants to merge 2 commits intodevelopfrom
storyblok-preview-state
Open

Storyblok preview state#1748
eleanorreem wants to merge 2 commits intodevelopfrom
storyblok-preview-state

Conversation

@eleanorreem
Copy link
Contributor

Resolves #enter-issue-number

What changes did you make and why did you make them?

Fix: Storyblok visual editor preview and click-to-edit

Two issues were preventing the Storyblok visual editor from working on staging:

CSP headers blocking the Storyblok iframe — frame-ancestors was hardcoded to 'self' and X-Frame-Options was set to DENY, preventing app.storyblok.com from embedding the staging site. Fixed by adding https://app.storyblok.com to the frameAncestorsUrls allowlist in scriptUrls.js and updating next.config.js to use it.

Click-to-edit not working — All Storyblok page components were receiving story.content spread as props from server components, so the Storyblok Bridge was never activated client-side. Fixed by adding useStoryblokState directly into each page component (StoryblokPage, StoryblokCoursePage, StoryblokSessionPage, StoryblokResourceSingleVideoPage, StoryblokResourceShortPage, StoryblokResourceConversationPage, StoryblokWelcomePage, StoryblokMeetTheTeamPage, HomePage). Each component now accepts a full ISbStoryData story object and activates the bridge internally, enabling live content updates and click-to-edit in the visual editor.

@vercel
Copy link

vercel bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bloom-frontend Ready Ready Preview, Comment Mar 17, 2026 2:06pm

Request Review

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.

1 participant