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

Add New Page Screen: rendering issue with galleries in thumbnails and previews #48881

Closed
ianstewart opened this issue Jan 13, 2021 · 6 comments
Closed
Assignees
Labels
[Closed] Fixed Issues explicitly fixed with PRs. Do not use for no longer reproducible issues. Template Selector [Type] Bug

Comments

@ianstewart
Copy link
Contributor

To reproduce this issue, visit the new page screen in Calypso.

Gallery screens are not correctly rendering in thumbnails.

image

The Mayland layout is not rendering at all in preview.

image

@andrewserong
Copy link
Member

@ianstewart, (this comment is very similar to the one in #48883) I put together a fix in #49101 that refactored the preview, however there are some concerns with the approach given that Ganon will be working on the redesigned layout picker shortly.

In the short-term, what do you think about us unpublishing / switching this layout to draft to hide it from the layout picker?

The issue is that the existing preview iframe does not load the necessary JS for the block to function. In the short-term it looks like the existing layout picker preview does not support any blocks that use JavaScript to render their default behaviour / layout.

@ianstewart
Copy link
Contributor Author

ianstewart commented Jan 26, 2021

Given the above direction, there's benefit in anticipating the changes and generally making blocks more resilient to rendering well in an iframe.
— Jon's comment on the PR

Sounds like it might be worth pursuing a fix still? But I'll draft the pattern in the meantime until we swap out the block and/or find a fix.

@andrewserong
Copy link
Member

Thanks Ian, much appreciated!

Sounds like it might be worth pursuing a fix still?

Yes, particularly for #48883 given that the Map block is under our care, it'd be good to get to the bottom of how best to get blocks that depend on JS to update their front end rendering to play nicely in iframes. I'm pleased that we can at least hide the errors in the meantime.

Let's keep these issues open, and we can add more context as we learn more.

@andrewserong
Copy link
Member

Looking into the issue in the screenshot separately in: 219-gh-Automattic/view-design — although this is specifically to do with the Masonry block, I get the feeling that fixing that display issue in the template/demo endpoint will resolve some other related issues.

@andrewserong
Copy link
Member

andrewserong commented Feb 24, 2021

Fix for 219-gh-Automattic/view-design in D57481-code. It's possible it'd be difficult to fix in the large iframe preview, because CoBlocks conditionally loads the JS for the block if the current post contains a masonry block (at least on the front end). Similarly to #48889, because the page layout picker will be refactored shortly, let's skip trying to get the large iframe preview working, and just focus on the fix for the template/demo endpoint in D57481-code. I'll leave this issue open until that fix lands.

@andrewserong
Copy link
Member

Closing now as the fix for the template/demo endpoint was rolled out in D57481-code, so the affected patterns should work correctly once the new page layout picker is launched.

@andrewserong andrewserong added the [Closed] Fixed Issues explicitly fixed with PRs. Do not use for no longer reproducible issues. label Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Closed] Fixed Issues explicitly fixed with PRs. Do not use for no longer reproducible issues. Template Selector [Type] Bug
Projects
None yet
Development

No branches or pull requests

3 participants