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

Page Variants: render the same template on both dead and live requests #327

Open
leandrocp opened this issue Aug 10, 2023 · 0 comments
Open
Labels
area:content Related to Content API and Content Management bug Something isn't working help wanted Extra attention is needed

Comments

@leandrocp
Copy link
Contributor

leandrocp commented Aug 10, 2023

Refreshing a page with variants may result in flashing elements due to rendering different templates between the dead and live requests. Once a template is defined in the dead request it should reuse the same template when it upgrades to live.

A possible solution to this problem is using https://hexdocs.pm/live_cache/LiveCache.html

To reproduce this bug:
1 - create a new page
2 - create one or more variants for that page
3 - publish the page
4 - visit that page
5 - hard refresh that page multiple times

You'll notice that sometimes it first loads a variant and after a second or less it loads another one (the difference between the dead and live render)

@leandrocp leandrocp added enhancement New feature or request help wanted Extra attention is needed bug Something isn't working and removed enhancement New feature or request labels Aug 14, 2023
@leandrocp leandrocp added the area:content Related to Content API and Content Management label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:content Related to Content API and Content Management bug Something isn't working help wanted Extra attention is needed
Projects
Status: Todo
Development

No branches or pull requests

1 participant