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

[WIP] Make preview SSR only #882

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

[WIP] Make preview SSR only #882

wants to merge 1 commit into from

Conversation

matheusgr
Copy link
Contributor

Block previews are susceptible to high memory usage and may generate excessive requests, especially when dealing with non-cacheable js resources (particularly on localhost calls).

To mitigate these issues, we avoid hydration. Consequently, the server responds with a concise HTML snippet, and the client refrains from using JavaScript to render the section. Nevertheless, we still display apps global sections and elements, ensuring that the theme and any other inserted HTML elements are visible in the preview.

This is a minor step towards resolving the block gallery issue. There are still several aspects that require further attention and improvement.

@matheusgr matheusgr requested a review from mcandeia January 2, 2025 20:26
Copy link
Contributor

github-actions bot commented Jan 2, 2025

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 1.108.4 update
  • 🎉 for Minor 1.109.0 update
  • 🚀 for Major 2.0.0 update

@matheusgr matheusgr changed the title Make preview SSR only [WIP] Make preview SSR only Jan 2, 2025
@matheusgr
Copy link
Contributor Author

Don't merge yet. The path from page previews / normal navigation on env is the same of the previews. We should only enable SSR on block preview.

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.

2 participants