Better HTML for LS and LCP (#3381)
This commit is contained in:
parent
16166d70e7
commit
2bdd3c3a86
|
|
@ -4,7 +4,7 @@ if browsertime.pageinfo && browsertime.pageinfo.cumulativeLayoutShift!== undefin
|
|||
if (browsertime.pageinfo.cumulativeLayoutShift === 0)
|
||||
p No layout shift detected.
|
||||
else
|
||||
p #{browsertime.pageinfo.cumulativeLayoutShift.toFixed(2)} cumulative layout shift collected from the
|
||||
p #{browsertime.pageinfo.cumulativeLayoutShift.toFixed(5)} cumulative layout shift collected from the
|
||||
a(href='https://web.dev/cls/') Cumulative Layout Shift API
|
||||
| .
|
||||
.row
|
||||
|
|
@ -20,10 +20,10 @@ if browsertime.pageinfo && browsertime.pageinfo.cumulativeLayoutShift!== undefin
|
|||
td #{info.score.toFixed(5)}
|
||||
td.url #{info.tags}
|
||||
tr
|
||||
td(colspan='2') #{info.domPath}
|
||||
td.url(colspan='2') #{info.domPath}
|
||||
.one-half.column
|
||||
- const screenshotNo = medianRun ? medianRun.runIndex : 1
|
||||
- const screenshotName = 'data/screenshots/' + screenshotNo + '/layoutShift.' + screenShotType
|
||||
a(href=screenshotName)
|
||||
img.screenshot(src=screenshotName, alt='Layout shift', style='max-width:100%; height: auto')
|
||||
p.small The elements that have shifted place is highlighted in the image. If the element shifted outside of the viewport, you will not see it there. It can be hard to understand what content that has shifted, if that's the case, checkout the video or the filmstrip of the run.
|
||||
p.small The elements that have shifted place is highlighted in the image (that have a higher value than 0.01). If the element shifted outside of the viewport, you will not see it there. It can be hard to understand what content that has shifted, if that's the case, checkout the video or the filmstrip of the run.
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ if timings.largestContentfulPaint
|
|||
td(colspan='2')
|
||||
b DOM path
|
||||
tr
|
||||
td(colspan='2')
|
||||
td.url(colspan='2')
|
||||
#{timings.largestContentfulPaint.domPath}
|
||||
.one-half.column
|
||||
- const screenshotNo = medianRun ? medianRun.runIndex : 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue