report: display plugins in footer - #17125
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
18a4861 to
f5b79ba
Compare
|
Done |
There was a problem hiding this comment.
This doesn't match the intended design laid out here: #9934 (comment)
Namely, one row per plugin; including the version (takes some work to get this); linking to npm; adding to credits. As it is, just listing the plugin names is not useful.
EDIT: I handled adding to the LHR credits here: #17232
Addresses review feedback on GoogleChrome#17125: listing plugin names alone isn't useful. Each plugin now gets its own footer row showing its npm package name and version, linked to that package on npm. A plugin's category ID is its npm package name, so it doubles as the link target. The version comes from the LHR credits -- the same channel the axe-core version already uses -- and is omitted when absent, so reports from runners that don't record it degrade to just the name.
|
Updated — each plugin now gets its own footer row showing package name and Merged main so #17232 is in, and verified end-to-end against One thing I ran into: your credits code handles scoped plugins |
| .lh-report-icon--plugin::before { | ||
| background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"/></svg>'); | ||
| } |
There was a problem hiding this comment.
Logo clips:
This looks right:
| .lh-report-icon--plugin::before { | |
| background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"/></svg>'); | |
| } | |
| .lh-report-icon--plugin::before { | |
| background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"/></svg>'); | |
| } |
| /** Label for a row in a table that shows the screen resolution and DPR that was emulated for the Lighthouse run. Example values: '800x600, DPR: 3' */ | ||
| runtimeSettingsScreenEmulation: 'Screen emulation', | ||
| /** Label for a row naming a single Lighthouse plugin used for this run, followed by that plugin's npm package name and version. Example row values: 'lighthouse-plugin-publisher-ads 1.2.3', 'lighthouse-plugin-field-performance 3.0.1' */ | ||
| runtimeSettingsPlugin: 'Plugin', |
|
Good catch re: |
- Drop the "Plugin:" label prefix. The row now shows just the package name and version: the word "plugin" is already in the package name, and the prefix overflowed the row. - Remove the now-unused runtimeSettingsPlugin UI string. - Stop giving the plugin icon SVG an intrinsic 24px size, so it scales to the 16px meta-icon box instead of being clipped.
|
Thank you! btw, have you developed a Lighthouse plugin? |
|
No, I haven't. I just picked up #9934 off the issue list, and the work was Why do you ask? Happy to take another one if there's something useful. |

Uh oh!
There was an error while loading. Please reload this page.