Skip to content

Commit

Permalink
docs: fix some broken links (GoogleChrome#13872)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Apr 19, 2022
1 parent af8f2f0 commit 7c0a84a
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ _Some incomplete notes_
3. `defaultPass.devtoolslog.json`: A log of all the [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/) events. Primary signal about network requests and page state.
* **Audit** - The [audits](../lighthouse-core/audits) are tests for a single feature/optimization/metric. Using the Artifacts as input, an audit evaluates a test and resolves to a numeric score. See [Understanding Results](./understanding-results.md) for details of the LHR (Lighthouse Result object).
* **Computed Artifacts** - [Generated](../lighthouse-core/computed) on-demand from artifacts, these add additional meaning, and are often shared amongst multiple audits.
* **Report** - The report UI, created client-side from the LHR. See [HTML Report Generation Overview](../report/readme.md) for details.
* **Report** - The report UI, created client-side from the LHR. See [HTML Report Generation Overview](../report/README.md) for details.

### Audit/Report terminology
* **Category** - Roll-up collection of audits and audit groups into a user-facing section of the report (eg. `Best Practices`). Applies weighting and overall scoring to the section. Examples: PWA, Accessibility, Best Practices.
Expand Down
32 changes: 16 additions & 16 deletions docs/new-audits.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
So, you want to create a new audit? Great! We're excited that you want to add to the Lighthouse project :) The goal of this
So, you want to create a new audit? Great! We're excited that you want to add to the Lighthouse project :) The goal of this
document is to help you understand what constitutes as a "good" audit for Lighthouse, and steps you can follow if you want
to propose a new audit.
to propose a new audit.

## New audit principles

Lighthouse audits that surface in the report should:
- be applicable to a significant portion of web developers (based on scale and severity of impact)
- contribute significantly towards making the mobile web experience better for end users.
- not have a significant impact on our runtime performance or bundle size.
- be new, not something that is already measured by existing audits.
- be applicable to a significant portion of web developers (based on scale and severity of impact)
- contribute significantly towards making the mobile web experience better for end users.
- not have a significant impact on our runtime performance or bundle size.
- be new, not something that is already measured by existing audits.
- be measurable (especially for performance audits) or have clear pass/fail states.
- be actionable - when failing, specific advice should be given. If the failure can be tied to a specific resource (a DOM element, script, line of code), use the appropriate detail type (see below). If multiple failures can occur for a page, return a table.
- not use 3rd party APIs for completing the audit check.
- not use 3rd party APIs for completing the audit check.

## Actionability

Expand All @@ -21,7 +21,7 @@ Lighthouse audits that surface in the report should:

### Detail Types

An audit can return a number of different [detail types](https://github.com/GoogleChrome/lighthouse/blob/master/types/audit-details.d.ts).
An audit can return a number of different [detail types](https://github.com/GoogleChrome/lighthouse/blob/master/types/lhr/audit-details.d.ts).

| detail type | resource | notes |
|---------------------------|-----------------------|----------------------------------------|
Expand Down Expand Up @@ -76,24 +76,24 @@ Standard Audit `failureTitle`: "Page does not work offline"

## Process for creating a new audit

1. Scan the criteria we’ve laid out above. If you think the principles match with your proposed new audit, then proceed!
1. Next step is to create an issue on GitHub with answers to the following questions:
1. Scan the criteria we’ve laid out above. If you think the principles match with your proposed new audit, then proceed!
1. Next step is to create an issue on GitHub with answers to the following questions:
```
#### Provide a basic description of the audit
#### How would the audit appear in the report?
#### How would the audit appear in the report?
<!-- How would the test look when passing? Would there be additional details available?
How would the test look when failing? What additional details are available?
How would the test look when failing? What additional details are available?
If the details are tabular, what are the columns?
If not obvious, how would passing/failing be defined? -->
#### How is this audit different from existing ones?
#### What % of developers/pages will this impact?
#### What % of developers/pages will this impact?
<!-- (Estimates OK, data points preferred) -->
#### How is the new audit making a better web for end users?
<!-- (Data points preferred) -->
#### What is the resourcing situation?
#### What is the resourcing situation?
<!-- Who will create the audits, write the documentation, and maintain both? -->
#### Any other links or documentation that we should check out?
```
3. Once the proposal is submitted, then Lighthouse team will take a look and followup. We will discuss possible implementation approaches, and associated runtime overhead.
With this new information we can better understand the impl cost and effort required and prioritize the audit into our sprint/roadmap.
1. Depending on the prioritization, we'll then work with you to figure out the necessary engineering/UX/product details.
With this new information we can better understand the impl cost and effort required and prioritize the audit into our sprint/roadmap.
1. Depending on the prioritization, we'll then work with you to figure out the necessary engineering/UX/product details.
4 changes: 2 additions & 2 deletions docs/understanding-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The result object contains all the audit information Lighthouse determined about

The top-level Lighthouse Result object (LHR) is what the lighthouse node module returns and the entirety of the JSON output of the CLI. It contains some metadata about the run and the results in the various subproperties below.

For an always up-to-date definition of the LHR, take a look [at our typedefs](https://github.com/GoogleChrome/lighthouse/blob/master/types/lhr.d.ts).
For an always up-to-date definition of the LHR, take a look [at our typedefs](https://github.com/GoogleChrome/lighthouse/blob/master/types/lhr/lhr.d.ts).

### Properties

Expand Down Expand Up @@ -60,7 +60,7 @@ An object containing the results of the audits, keyed by their name.
| displayValue | <code>string&#124;undefined</code> | The string to display in the report alongside audit results. If empty, nothing additional is shown. This is typically used to explain additional information such as the number and nature of failing items. |
| score | <code>number&#124;null</code> | The scored value determined by the audit provided in the numeric range `0-1`, or null if `scoreDisplayMode` indicates not scored. |
| scoreDisplayMode | <code>"binary" &#124; "numeric" &#124; "error" &#124; "manual" &#124; "notApplicable" &#124; "informative"</code> | A string identifying how the score should be interpreted for display i.e. is the audit pass/fail (score of 1 or 0), did it fail, should it be ignored, or are there shades of gray (scores between 0-1 inclusive). If set as `informative`, `notApplicable`, `manual`, or `error`, then `score` will be null and should be ignored. |
| details | `Object` | Extra information found by the audit necessary for display. The structure of this object varies from audit to audit. The [structure of this object](https://github.com/GoogleChrome/lighthouse/blob/master/types/audit-details.d.ts) is somewhat stable between minor version bumps as this object is used to render the HTML report. |
| details | `Object` | Extra information found by the audit necessary for display. The structure of this object varies from audit to audit. The [structure of this object](https://github.com/GoogleChrome/lighthouse/blob/master/types/lhr/audit-details.d.ts) is somewhat stable between minor version bumps as this object is used to render the HTML report. |


### Example
Expand Down
4 changes: 2 additions & 2 deletions docs/v8-perf-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ here](https://web.dev/performance-scoring/).
### What is the most exciting update in LH v8?

We're really excited about the [interactive
treemap](https://github.com/GoogleChrome/lighthouse/blob/v8changelog/changelog.md#treemap-release),
treemap](https://github.com/GoogleChrome/lighthouse/releases/tag/v7.5.0#:~:text=We%20are%20releasing%20the%20Lighthouse%20Treemap),
[filtering audits by
metric](https://github.com/GoogleChrome/lighthouse/blob/v8changelog/changelog.md#:~:text=new%20metric%20filter),
metric](https://github.com/GoogleChrome/lighthouse/releases/tag/v8.0.0#:~:text=The%20report%20includes%20a-,new%20metric%20filter,-.%20Pick%20a%20metric),
and the new [Content Security Policy
audit](https://web.dev/strict-csp/#adopting-a-strict-csp), which was a
collaboration with the Google Web Security team.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const UIStrings = {
// eslint-disable-next-line max-len
// TODO: web.dev article. this codelab is good starting place: https://web.dev/codelab-serve-modern-code/
/** Description of a Lighthouse audit that tells the user about old JavaScript that is no longer needed. This is displayed after a user expands the section to see more. No character length limits. 'Learn More' becomes link text to additional documentation. */
description: 'Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren\'t necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. [Learn More](https://philipwalton.com/articles/deploying-es2015-code-in-production-today/)',
description: 'Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren\'t necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. [Learn More](https://web.dev/publish-modern-javascript/)',
};

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3177,7 +3177,7 @@
"legacy-javascript": {
"id": "legacy-javascript",
"title": "Avoid serving legacy JavaScript to modern browsers",
"description": "Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren't necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. [Learn More](https://philipwalton.com/articles/deploying-es2015-code-in-production-today/)",
"description": "Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren't necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. [Learn More](https://web.dev/publish-modern-javascript/)",
"score": 1,
"scoreDisplayMode": "numeric",
"numericValue": 0,
Expand Down Expand Up @@ -9032,7 +9032,7 @@
"legacy-javascript": {
"id": "legacy-javascript",
"title": "Avoid serving legacy JavaScript to modern browsers",
"description": "Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren't necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. [Learn More](https://philipwalton.com/articles/deploying-es2015-code-in-production-today/)",
"description": "Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren't necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. [Learn More](https://web.dev/publish-modern-javascript/)",
"score": 1,
"scoreDisplayMode": "numeric",
"numericValue": 0,
Expand Down Expand Up @@ -17256,7 +17256,7 @@
"legacy-javascript": {
"id": "legacy-javascript",
"title": "Avoid serving legacy JavaScript to modern browsers",
"description": "Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren't necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. [Learn More](https://philipwalton.com/articles/deploying-es2015-code-in-production-today/)",
"description": "Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren't necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. [Learn More](https://web.dev/publish-modern-javascript/)",
"score": 1,
"scoreDisplayMode": "numeric",
"numericValue": 0,
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/test/results/sample_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5103,7 +5103,7 @@
"legacy-javascript": {
"id": "legacy-javascript",
"title": "Avoid serving legacy JavaScript to modern browsers",
"description": "Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren't necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. [Learn More](https://philipwalton.com/articles/deploying-es2015-code-in-production-today/)",
"description": "Polyfills and transforms enable legacy browsers to use new JavaScript features. However, many aren't necessary for modern browsers. For your bundled JavaScript, adopt a modern script deployment strategy using module/nomodule feature detection to reduce the amount of code shipped to modern browsers, while retaining support for legacy browsers. [Learn More](https://web.dev/publish-modern-javascript/)",
"score": 0.88,
"scoreDisplayMode": "numeric",
"numericValue": 150,
Expand Down
2 changes: 1 addition & 1 deletion shared/localization/locales/en-US.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion shared/localization/locales/en-XL.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7c0a84a

Please sign in to comment.