Bark theme: when creating a new site, preview of theme doesn't show images and shows a random blank space #95165
Labels
[Feature] Design Picker
Picking themes and designs during onboarding.
[Feature] Premium Automattic Themes
Exclusive themes available to premium plan users.
[Pri] TBD
[Type] Bug
When going through creating a new site, I noticed that the bark theme is missing an image on the homepage in the preview and, when clicking into the theme, the preview shows a large blank space at the top that breaks the design.
bark.theme.mov
This has since been fixed for Bark, but the underlying limitation still exists. The theme demo site's frontpage wrapped the contents in a group block and than added some css to hide the ensuing gap
The theme preview comes from https://public-api.wordpress.com/wpcom/v2/block-previews/site?stylesheet=pub%2Fbark&langu[…]_height=1040&viewport_unit_to_px=true&calypso_token=bark (the onboarding design picker uses a cached screenshot of this output).
This endpoint disassembles the homepage of the theme's demo site into header, content & footer. You can see in the video above that the header and footer exist, but not the content. @dsas thinks this is because the theme preview code tries to identify one "main" block to use as the content, but the Bark theme's frontpage has several blocks without a wrapping block to use as "main".
See
get_patterns_from_demo_site_homepage
(fbhepr%2Skers%2Sjcpbz%2Sjc%2Qpbagrag%2Serfg%2Qncv%2Qcyhtvaf%2Sraqcbvagf%2Soybpx%2Qcerivrjf%2Soybpx%2Qcerivrjf%2Qfvgr.cuc%3Se%3Q03ss38pn%23153-og) which callsget_homepage
(fbhepr%2Skers%2Sjcpbz%2Sjc%2Qpbagrag%2Syvo%2Scnggreaf%2Scnggrea%2Qfgberf.cuc%3Se%3Q07024q59%23196-og)The text was updated successfully, but these errors were encountered: