Skip to content

mShots does not appear to render Mapbox embeds #30

@andrewserong

Description

@andrewserong

It appears that mShots does not render Mapbox embeds. At first I thought this might be an issue with mShots not waiting long enough for JavaScript to complete executing, however we haven't managed to replicate the issue with other blocks. The hunch at the moment is that it's somehow particular to Mapbox and / or using <canvas>.

It looks like this on the front end of a real site:

pbYkd9-2R-p2

image

Via mShots it doesn't appear to finish loading before the screenshot is taken:

image

https://s0.wordpress.com/mshots/v1/https://andysfakeblockpatternsourcesite.wordpress.com/2021/01/29/test-map-layout/

@simison suggested in Automattic/wp-calypso#49101 that we might be able to adjust something in

const response = await page.goto( m_uri, { waitUntil: 'networkidle2' } ).
https://pptr.dev/#?product=Puppeteer&version=main&show=api-pagewaitfornavigationoptions

It's likely that this issue will be a blocker for a screenshots-based page layout picker in Calypso. Since this currently only affects one kind of block, it may not be a blocker, but would be a good thing to find a fix for eventually.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions