-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add Largest Contentful Paint documentation for Lighthouse #1639
Conversation
Deploy preview for web-dev-staging ready! Built with commit 255c2f2 |
Rationale for why this doc should exist even though it's short: The LCP doc by Phil Walton that already exists on web.dev is excellent. One might wonder why we need the new doc that's being created in this PR and why the Lighthouse UI shouldn't just link out to Phil's doc. In general, all of the Lighthouse documentation have the same structure, which we believe results in a more consistent UX. In other words, when you click on one of the "Learn more" links next to a metric in the Lighthouse report UI, you can expect the doc to tell you what the metric measures, how Lighthouse determines the metric score, and how to improve the metric. Phil's post also doesn't cover any Lighthouse specific stuff, like how exactly Lighthouse calculates LCP data. So rather than hacking Phil's doc to cover an audience that it wasn't intended for (Lighthouse users), our general approach is to just create a minimal Lighthouse doc, and then link out to Phil's great content where relevant. |
--- | ||
|
||
<!-- TODO https://web.dev/largest-contentful-paint already exists. | ||
What should the URL for this page be? --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this comment mentions, the most obvious URL for this page already exists, so we'll have to use something like /lighthouse-largest-contentful-paint/
, which is a bit clunky IMO, but probably NBD in the long run.
need to calculate LCP. It just uses the [Largest Contentful Paint API][api] to get LCP | ||
data from Chrome. | ||
|
||
<!-- TODO explain how the LCP data is mapped to a score between 0 and 100. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@connorjclark how does LCP get mapped to red/green/orange?
Example: https://web.dev/first-contentful-paint/#how-lighthouse-determines-your-fcp-score
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All performance scores are green @ 90, yellow @ 50. We haven't determined these curves yet, so I can't yet provide what LCP values these would be.
src/site/content/en/lighthouse-performance/lighthouse-largest-contentful-paint/index.md
Outdated
Show resolved
Hide resolved
|
||
## How to improve your LCP score | ||
|
||
See [How to improve Largest Contentful Paint on your site][improve]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See this comment if you're wondering why this doc should exist even though it's minimal and mostly just links out to web.dev/largest-contentful-paint/
Hi @connorjclark since you wrote the first PR for LCP I'm guessing that you're the best PoC for this new LCP content. Please provide a technical review on this PR:
|
need to calculate LCP. It just uses the [Largest Contentful Paint API][api] to get LCP | ||
data from Chrome. | ||
|
||
<!-- TODO explain how the LCP data is mapped to a score between 0 and 100. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All performance scores are green @ 90, yellow @ 50. We haven't determined these curves yet, so I can't yet provide what LCP values these would be.
src/site/content/en/lighthouse-performance/lighthouse-largest-contentful-paint/index.md
Outdated
Show resolved
Hide resolved
src/site/content/en/lighthouse-performance/lighthouse-largest-contentful-paint/index.md
Outdated
Show resolved
Hide resolved
src/site/content/en/lighthouse-performance/lighthouse-largest-contentful-paint/index.md
Outdated
Show resolved
Hide resolved
Thank you @connorjclark for the review! |
Blocked until the audit lands in Lighthouse. |
Fixes #1628
Changes proposed in this pull request:
/lighthouse-largest-contentful-paint/
/lighthouse-performance/
to link to the new doc