Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong LCP type captured in the DB #6552

Closed
jeawhanlee opened this issue Apr 10, 2024 · 3 comments · Fixed by #6559
Closed

Wrong LCP type captured in the DB #6552

jeawhanlee opened this issue Apr 10, 2024 · 3 comments · Fixed by #6559
Assignees
Labels
lcp type: bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@jeawhanlee
Copy link
Contributor

jeawhanlee commented Apr 10, 2024

Before submitting an issue please check that you’ve completed the following steps:

  • Using 3.16-pre-alpha
  • Used the search feature to ensure that the bug hasn’t been reported before

Describe the bug
When a background image is identified as the LCP, the type in the DB reads img

To Reproduce
Steps to reproduce the behavior:

  1. Use a background image as the LCP
  2. Visit the page
  3. See in DB that lcp type is captured as img

Expected behavior
We should capture background image LCP as bg-img instead of img

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Acceptance Criteria (for WP Media team use only)
Clear instructions for developers, to be added before the grooming

@jeawhanlee jeawhanlee added type: bug Indicates an unexpected problem or unintended behavior lcp labels Apr 10, 2024
@MathieuLamiot
Copy link
Contributor

Is this something that is not supposed to be covered by the existing issues?
image

@jeawhanlee
Copy link
Contributor Author

@MathieuLamiot Yes I think it could be when modifying the beacon script because right now I see that the type is hardcoded here:


But as of right now, I see that the beacon script captures the single background image.

@MathieuLamiot
Copy link
Contributor

MathieuLamiot commented Apr 10, 2024

Ok, so let's fix this for single background images.

@MathieuLamiot MathieuLamiot added this to the 3.16 milestone Apr 10, 2024
Miraeld added a commit that referenced this issue Apr 16, 2024
The type was hardcoded as `img`, now it becomes dynamic and set by the `lcp-beacon.js` script.
@Miraeld Miraeld self-assigned this Apr 16, 2024
@Miraeld Miraeld linked a pull request Apr 16, 2024 that will close this issue
14 tasks
Miraeld added a commit that referenced this issue Apr 17, 2024
The type was hardcoded as `img`, now it becomes dynamic and set by the `lcp-beacon.js` script.
@piotrbak piotrbak closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lcp type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants