lighthouse 9.5.0-dev.20220510 → 9.5.0-dev.20220513
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/report/bundle.esm.js +5 -354
- package/dist/report/flow.js +20 -25
- package/dist/report/standalone.js +17 -22
- package/lighthouse-core/audits/metrics/experimental-interaction-to-next-paint.js +3 -1
- package/lighthouse-core/audits/work-during-interaction.js +48 -14
- package/lighthouse-core/computed/metrics/responsiveness.js +12 -9
- package/lighthouse-core/fraggle-rock/config/default-config.js +3 -1
- package/lighthouse-core/gather/gatherers/trace-elements.js +21 -2
- package/package.json +1 -1
- package/report/assets/styles.css +5 -2
- package/report/renderer/api.js +0 -1
- package/report/renderer/components.js +1 -1
- package/report/renderer/details-renderer.js +4 -4
- package/report/test/clients/bundle-test.js +0 -1
- package/report/test/renderer/details-renderer-test.js +9 -9
- package/shared/localization/locales/en-US.json +5 -2
- package/shared/localization/locales/en-XL.json +5 -2
- package/types/artifacts.d.ts +1 -1
- package/types/lhr/audit-details.d.ts +3 -1
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
|
|
27
27
|
import {Util} from './util.js';
|
|
28
28
|
import {CriticalRequestChainRenderer} from './crc-details-renderer.js';
|
|
29
|
-
import {SnippetRenderer} from './snippet-renderer.js';
|
|
30
29
|
import {ElementScreenshotRenderer} from './element-screenshot-renderer.js';
|
|
31
30
|
|
|
32
31
|
const URL_PREFIXES = ['http://', 'https://', 'data:'];
|
|
@@ -472,15 +471,16 @@ export class DetailsRenderer {
|
|
|
472
471
|
}
|
|
473
472
|
|
|
474
473
|
/**
|
|
475
|
-
* @param {LH.Audit.Details.List} details
|
|
474
|
+
* @param {LH.FormattedIcu<LH.Audit.Details.List>} details
|
|
476
475
|
* @return {Element}
|
|
477
476
|
*/
|
|
478
477
|
_renderList(details) {
|
|
479
478
|
const listContainer = this._dom.createElement('div', 'lh-list');
|
|
480
479
|
|
|
481
480
|
details.items.forEach(item => {
|
|
482
|
-
const
|
|
483
|
-
|
|
481
|
+
const listItem = this.render(item);
|
|
482
|
+
if (!listItem) return;
|
|
483
|
+
listContainer.append(listItem);
|
|
484
484
|
});
|
|
485
485
|
|
|
486
486
|
return listContainer;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
import fs from 'fs';
|
|
9
8
|
|
|
10
9
|
import jsdom from 'jsdom';
|
|
@@ -188,24 +188,24 @@ describe('DetailsRenderer', () => {
|
|
|
188
188
|
});
|
|
189
189
|
|
|
190
190
|
it('renders lists', () => {
|
|
191
|
-
const
|
|
192
|
-
type: '
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
lineMessages: [],
|
|
196
|
-
generalMessages: [],
|
|
197
|
-
lineCount: 100,
|
|
191
|
+
const table = {
|
|
192
|
+
type: 'table',
|
|
193
|
+
headings: [{text: '', key: 'numeric', itemType: 'numeric'}],
|
|
194
|
+
items: [{numeric: 1234.567}],
|
|
198
195
|
};
|
|
199
196
|
|
|
200
197
|
const el = renderer.render({
|
|
201
198
|
type: 'list',
|
|
202
|
-
items: [
|
|
199
|
+
items: [table, table],
|
|
203
200
|
});
|
|
204
201
|
|
|
205
202
|
assert.equal(el.localName, 'div');
|
|
206
203
|
assert.ok(el.classList.contains('lh-list'), 'has list class');
|
|
207
204
|
assert.ok(el.children.length, 2, 'renders all items');
|
|
208
|
-
|
|
205
|
+
for (const child of el.children) {
|
|
206
|
+
assert.ok(child.classList.contains('lh-table'));
|
|
207
|
+
assert.equal(child.textContent, '1,234.6');
|
|
208
|
+
}
|
|
209
209
|
});
|
|
210
210
|
|
|
211
211
|
it('does not render internal-only screenshot details', () => {
|
|
@@ -1664,6 +1664,9 @@
|
|
|
1664
1664
|
"lighthouse-core/audits/work-during-interaction.js | displayValue": {
|
|
1665
1665
|
"message": "{timeInMs, number, milliseconds} ms spent on event '{interactionType}'"
|
|
1666
1666
|
},
|
|
1667
|
+
"lighthouse-core/audits/work-during-interaction.js | eventTarget": {
|
|
1668
|
+
"message": "Event target"
|
|
1669
|
+
},
|
|
1667
1670
|
"lighthouse-core/audits/work-during-interaction.js | failureTitle": {
|
|
1668
1671
|
"message": "Minimize work during key interaction"
|
|
1669
1672
|
},
|
|
@@ -1673,8 +1676,8 @@
|
|
|
1673
1676
|
"lighthouse-core/audits/work-during-interaction.js | presentationDelay": {
|
|
1674
1677
|
"message": "Presentation delay"
|
|
1675
1678
|
},
|
|
1676
|
-
"lighthouse-core/audits/work-during-interaction.js |
|
|
1677
|
-
"message": "Processing
|
|
1679
|
+
"lighthouse-core/audits/work-during-interaction.js | processingTime": {
|
|
1680
|
+
"message": "Processing time"
|
|
1678
1681
|
},
|
|
1679
1682
|
"lighthouse-core/audits/work-during-interaction.js | title": {
|
|
1680
1683
|
"message": "Minimizes work during key interaction"
|
|
@@ -1664,6 +1664,9 @@
|
|
|
1664
1664
|
"lighthouse-core/audits/work-during-interaction.js | displayValue": {
|
|
1665
1665
|
"message": "{timeInMs, number, milliseconds} m̂ś ŝṕêńt̂ ón̂ év̂én̂t́ '{interactionType}'"
|
|
1666
1666
|
},
|
|
1667
|
+
"lighthouse-core/audits/work-during-interaction.js | eventTarget": {
|
|
1668
|
+
"message": "Êv́êńt̂ t́âŕĝét̂"
|
|
1669
|
+
},
|
|
1667
1670
|
"lighthouse-core/audits/work-during-interaction.js | failureTitle": {
|
|
1668
1671
|
"message": "M̂ín̂ím̂íẑé ŵór̂ḱ d̂úr̂ín̂ǵ k̂éŷ ín̂t́êŕâćt̂íôń"
|
|
1669
1672
|
},
|
|
@@ -1673,8 +1676,8 @@
|
|
|
1673
1676
|
"lighthouse-core/audits/work-during-interaction.js | presentationDelay": {
|
|
1674
1677
|
"message": "P̂ŕêśêńt̂át̂íôń d̂él̂áŷ"
|
|
1675
1678
|
},
|
|
1676
|
-
"lighthouse-core/audits/work-during-interaction.js |
|
|
1677
|
-
"message": "P̂ŕôćêśŝín̂ǵ
|
|
1679
|
+
"lighthouse-core/audits/work-during-interaction.js | processingTime": {
|
|
1680
|
+
"message": "P̂ŕôćêśŝín̂ǵ t̂ím̂é"
|
|
1678
1681
|
},
|
|
1679
1682
|
"lighthouse-core/audits/work-during-interaction.js | title": {
|
|
1680
1683
|
"message": "M̂ín̂ím̂íẑéŝ ẃôŕk̂ d́ûŕîńĝ ḱêý îńt̂ér̂áĉt́îón̂"
|
package/types/artifacts.d.ts
CHANGED
|
@@ -573,7 +573,7 @@ declare module Artifacts {
|
|
|
573
573
|
}
|
|
574
574
|
|
|
575
575
|
interface TraceElement {
|
|
576
|
-
traceEventType: 'largest-contentful-paint'|'layout-shift'|'animation';
|
|
576
|
+
traceEventType: 'largest-contentful-paint'|'layout-shift'|'animation'|'responsiveness';
|
|
577
577
|
score?: number;
|
|
578
578
|
node: NodeDetails;
|
|
579
579
|
nodeId?: number;
|
|
@@ -58,7 +58,9 @@ declare module Details {
|
|
|
58
58
|
|
|
59
59
|
interface List {
|
|
60
60
|
type: 'list';
|
|
61
|
-
|
|
61
|
+
// NOTE: any `Details` type *should* be usable in `items`, but check
|
|
62
|
+
// styles/report-ui-features are good before adding.
|
|
63
|
+
items: Array<Table | DebugData>;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
interface Opportunity {
|