Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Add Largest Contentful Paint documentation for Lighthouse #1639

Merged
merged 5 commits into from
Jan 10, 2020
Merged

Add Largest Contentful Paint documentation for Lighthouse #1639

merged 5 commits into from
Jan 10, 2020

Conversation

kaycebasques
Copy link
Contributor

@kaycebasques kaycebasques commented Oct 9, 2019

Fixes #1628

Changes proposed in this pull request:

  • Adds /lighthouse-largest-contentful-paint/
  • Updates /lighthouse-performance/ to link to the new doc

@googlebot googlebot added the cla: yes Contributor has signed the CLA label Oct 9, 2019
@netlify
Copy link

netlify bot commented Oct 9, 2019

Deploy preview for web-dev-staging ready!

Built with commit 255c2f2

https://deploy-preview-1639--web-dev-staging.netlify.com

@kaycebasques
Copy link
Contributor Author

kaycebasques commented Oct 9, 2019

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? -->
Copy link
Contributor Author

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. -->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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.


## How to improve your LCP score

See [How to improve Largest Contentful Paint on your site][improve].
Copy link
Contributor Author

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/

@kaycebasques
Copy link
Contributor Author

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:

  • Reply to the comments where I ask you for technical details
  • Check that the explanation of what LCP measures is accurate
  • Check that the explanation of how Lighthouse gets LCP data is accurate
  • Check if the guidance is relevant. In this case, the guidance is just a link to Phil's "How to improve LCP on your site" section, so it's just a matter of checking if Phil covered all of the important topics.

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. -->
Copy link
Contributor

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.

@kaycebasques
Copy link
Contributor Author

Thank you @connorjclark for the review!

@kaycebasques
Copy link
Contributor Author

Blocked until the audit lands in Lighthouse.

@kaycebasques kaycebasques removed the DO NOT MERGE Actively working on but experimental label Jan 10, 2020
@kaycebasques kaycebasques merged commit 33b184f into GoogleChrome:master Jan 10, 2020
@kaycebasques kaycebasques deleted the lcp branch January 10, 2020 22:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Contributor has signed the CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

content: Lighthouse doc for Largest Contentful Paint
3 participants