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

Closes #6553: Frontend optimization applied for the wrong element in some cases #6554

Conversation

jeawhanlee
Copy link
Contributor

Description

Fixes an issue where frontend optimization(fetchpriority attribute) is applied to wrong element.

Fixes #6553

Documentation

User documentation

Explain how this code impacts users.

Technical documentation

Adjust REGEX to capture correct LCP element.

Type of change

  • Bug fix (non-breaking change which fixes an issue).

New dependencies

List any new dependencies that are required for this change.

Risks

List possible performance & security issues or risks, and explain how they have been mitigated.

Checklists

Feature validation

  • I validated all the Acceptance Criteria. If possible, provide sreenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Documentation

  • I prepared the user documentation for the feature/enhancement and shared it in the PR or the GitHub issue.
  • The user documentation covers new/changed entry points (endpoints, WP hooks, configuration files, ...).
  • I prepared the technical documentation if needed, and shared it in the PR or the GitHub issue.

Code style

  • I wrote self-explanatory code about what it does.
  • I wrote comments to explain why it does it.
  • I named variables and functions explicitely.
  • I protected entry points against unexpected inputs.
  • I did not introduce unecessary complexity.
  • I listed the introduced external dependencies explicitely on the PR.
  • I validated the repo-specific guidelines from CONTRIBUTING.md.

Observability

  • I handled errors when needed.
  •  I wrote user-facing messages that are understandable and provide actionable feedbacks.
  • I prepared ways to observe the implemented system (logs, data, etc.).

Risks

  •  I explicitely mentioned performance risks in the PR.
  • I explicitely mentioned security risks in the PR.

@jeawhanlee jeawhanlee added type: bug Indicates an unexpected problem or unintended behavior lcp labels Apr 10, 2024
@jeawhanlee jeawhanlee self-assigned this Apr 10, 2024
@jeawhanlee jeawhanlee marked this pull request as ready for review April 10, 2024 12:46
@jeawhanlee jeawhanlee requested a review from a team April 10, 2024 12:46
Copy link
Contributor

@remyperona remyperona left a comment

Choose a reason for hiding this comment

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

Could we have a test case to cover this?

@jeawhanlee jeawhanlee linked an issue Apr 10, 2024 that may be closed by this pull request
@jeawhanlee jeawhanlee requested a review from remyperona April 11, 2024 14:02
@jeawhanlee jeawhanlee merged commit 0a85128 into feature/lcp-above-the-fold-optimization Apr 18, 2024
9 checks passed
@jeawhanlee jeawhanlee deleted the fix/6553-frontend-optimization-applied-for-the-wrong-element-in-some-cases branch April 18, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Frontend optimization applied for the wrong element in some cases
2 participants