Open BioPhoton opened 6 months ago
TODO: @matejchalk create ticket for portal
I’ve been looking into this, and it seems like the CLS audit (and possibly some others) doesn’t actually include information about the relevant URL or HTML snippet. Instead, it’s more about performance metrics like cumulativeLayoutShiftMainFrame
, which are unrelated to the issue source or rendered HTML elements.
Could you share more details on when and where we’d expect to use the new sourceUrlLocationSchema
? Just trying to get a better understanding of what specific cases we’d need it for.
{
id: 'cumulative-layout-shift',
title: 'Cumulative Layout Shift',
description:
'Cumulative Layout Shift measures the movement of visible elements within the viewport. [Learn more about the Cumulative Layout Shift metric](https://web.dev/articles/cls).',
score: 1,
scoreDisplayMode: 'numeric',
numericValue: 0,
numericUnit: 'unitless',
displayValue: '0',
explanation: undefined,
errorMessage: undefined,
errorStack: undefined,
warnings: undefined,
scoringOptions: { p10: 0.1, median: 0.25 },
metricSavings: undefined,
details: {
type: 'debugdata',
items: [
{
cumulativeLayoutShiftMainFrame: 0.00019666053497657064,
newEngineResult: undefined,
newEngineResultDiffered: false,
},
],
},
guidanceLevel: undefined,
};
User story
At the moment the
Issue
type only acceptsSourceFileLocation
like follows:As some of problems could be
HTML
under a rendered URL we could consider this format as additional issue location.A example for the above described case could be CLS elements within a page measured by the
cumulative-layout-shifts
audit.Acceptance criteria
models
package extends the model for issue location withsourceUrlLocationSchema
cli
package uploads the new data to the backendportal
displays the new dataImplementation details