react-styleguidist-visual icon indicating copy to clipboard operation
react-styleguidist-visual copied to clipboard

TypeError: Cannot read property 'href' of null

Open tamlyn opened this issue 7 years ago • 1 comments
trafficstars

The new pagePerSection config in React Styleguidist 6.5 disables isolated mode. This means scraping fails as it uses the isolated mode buttons to get the component URL.

~~Looking into a fix now.~~

Looks like the URLs are used to load each preview in isolated mode before taking the screenshot. Why can't it just take screenshots on the main page?

tamlyn avatar Mar 27 '18 11:03 tamlyn

Ah, it was because I wanted the element to be inside the viewport when I'm taking the screenshot, because projects like https://microsoft.github.io/YamUI/ wait until the element is inside the viewport to render it, in order to reduce page load time.

unindented avatar Mar 27 '18 15:03 unindented