react-styleguidist-visual
react-styleguidist-visual copied to clipboard
TypeError: Cannot read property 'href' of null
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?
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.