happo icon indicating copy to clipboard operation
happo copied to clipboard

No way to tell when a new screenshot is rendering outside the viewport

Open majapw opened this issue 7 years ago • 1 comments

When an initial screenshot is taken with happo of a new example, there is no indication of whether or not any of the content is rendered outside of the viewport. The screenshot just stretches to display the whole content. It would be pretty cool if there were a border or something similar to indicate where the actual viewport was.

fyi: @lencioni

majapw avatar Jun 01 '17 18:06 majapw

This is a good idea. I think the best way to apply this would be on the review page, dynamically. It looks like we're only passing viewportName to that view, so doing this would be a two-fold thing:

  • First, make sure that runVisualDiffs saves the viewport width along with the name. Somewhere around here: https://github.com/Galooshi/happo/blob/c291f5fa9e729e49c8b1d2246a288da18ed51052/packages/happo-target-firefox/src/runVisualDiffs.js#L202
  • Then, use that number in the NewImage React component: https://github.com/Galooshi/happo/blob/c291f5fa9e729e49c8b1d2246a288da18ed51052/packages/happo-viewer/src/NewImage.jsx

trotzig avatar Jun 02 '17 06:06 trotzig