elastic / uptime

This project includes resources and general issue tracking for the Elastic Uptime solution
12 stars 3 forks source link

Uptime not handling different sized screenshots (mobile) particularly well #339

Closed paulb-elastic closed 3 years ago

paulb-elastic commented 3 years ago

Kibana 7.14 (local, checked with build just now)

When using mobile device emulation in a Synthetics test, for example with:

playwrightOptions: {
    userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1',
    viewport: {
        width: 375,
        height: 667,
    },
    deviceScaleFactor: 2,
    isMobile: true,
    hasTouch: true,
}

Uptime has trouble showing the different sized image in some places.

Hovers and clicks to see the big (non thumbnail) image seems to be ok

Click to expand ![image](https://user-images.githubusercontent.com/70908889/125440372-d76b992f-471b-4017-b6c5-24cff628d363.png)

Test result history seems ok:

Click to expand ![image](https://user-images.githubusercontent.com/70908889/125440400-14fd6b77-02b1-4fe3-abe0-ed1df96ca246.png)

Clicking through to a test result seems ok

Click to expand ![image](https://user-images.githubusercontent.com/70908889/125440428-3f177448-6d6c-4ebe-9c05-a57bf1461e45.png)

However, expanding the step does not give enough space for the image:

Video_2021-07-13_114716

(in this animation, I have scrolled all the way to the bottom of the screen, but the image is being chopped off.

vigneshshanmugam commented 3 years ago

@paulb-elastic This is a bug because of the way our Synthetics agent chops the given image based on the dimensions of the device, When we construct squares from the given dimensions, if the block results in floating point number, we chop that value off and always go for the nearest truncated value to make sure the underlying library is able to construct block - As a result we are missing few dimensions of the image which is shown in the final screenshot output.

I mentioned in the fix - https://github.com/elastic/synthetics/pull/340, but should have pinged the team about it.

vigneshshanmugam commented 3 years ago

Should not have jumped in early without seeing the full screenshots. This is not related to synthetics agent, Probably a UI bug.

I was referring to the black borders around the image which you wont see for any desktop screenshots.

andrewvc commented 3 years ago

I'm still seeing this on 7.15. I accidentally tested this as part of the 7.15 test plan:

image

justinkambic commented 3 years ago

@andrewvc how does it look when you expand the row? IIRC the original complaint in this issue was that the image rendered way incorrectly for "portrait" aspect ratios (per the GIF in the issue description). While the image in the row does look somewhat goofy compared to desktop screenshots, we never changed that rendering as a part of this fix. I think if we did make it so the rows didn't grow at all for the thumbnail, it might be really tough to make out detail.

paulb-elastic commented 3 years ago

We confirmed that the original issue (of not being able to see the full height of the image) is still working in 7.15.

paulb-elastic commented 3 years ago

https://github.com/elastic/synthetics/issues/371 raised to cover the separate issue of the border that is sometimes visible with some viewports.