Skip to content

Fix typos and clarify grammar in documentation and comments #2005

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

Merged
merged 1 commit into from
May 8, 2025

Conversation

westonruter
Copy link
Member

Updated various documentation and in-code comments to fix typos, improve grammar, and enhance clarity. These changes ensure better readability and more precise communication across the codebase, especially in user-facing docs and inline explanations. These issues were flagged via static analysis in PhpStorm.

Updated various documentation and in-code comments to fix typos, improve grammar, and enhance clarity. These changes ensure better readability and more precise communication across the codebase, especially in user-facing docs and inline explanations. These issues were flagged via static analysis in PhpStorm.
@westonruter westonruter requested review from ShyamGadde and b1ink0 May 8, 2025 05:19
@westonruter westonruter added [Type] Bug An existing feature is broken [Plugin] Optimization Detective Issues for the Optimization Detective plugin labels May 8, 2025
@westonruter westonruter requested a review from felixarntz as a code owner May 8, 2025 05:19
@westonruter westonruter added the skip changelog PRs that should not be mentioned in changelogs label May 8, 2025
$block_template = get_block_template( $_wp_current_template_id, 'wp_template' );
$block_template = get_block_template( $_wp_current_template_id );
Copy link
Member Author

Choose a reason for hiding this comment

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

PhpStorm flagged the passing of the default value for the second parameter.

Copy link

github-actions bot commented May 8, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: westonruter <[email protected]>
Co-authored-by: b1ink0 <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link

codecov bot commented May 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.54%. Comparing base (8a4987d) to head (562361f).
Report is 2 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk    #2005   +/-   ##
=======================================
  Coverage   72.54%   72.54%           
=======================================
  Files          88       88           
  Lines        7116     7116           
=======================================
  Hits         5162     5162           
  Misses       1954     1954           
Flag Coverage Δ
multisite 72.54% <100.00%> (ø)
single 40.05% <33.33%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

( element ) => [ element, element.dataset.odXpath ]
( element ) => [ element, element.getAttribute( 'data-od-xpath' ) ]
Copy link
Member Author

Choose a reason for hiding this comment

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

This change here is done because in PhpStorm, it's not known that dataset is defined on Element not just HTMLElement. I checked in Chrome, Safari, and Firefox and it turns out that dataset is actually defined on embedded SVG and MathML elements. I can see that SVGElement.dataset is defined as is MathMLElement.dataset defined, although it is Baseline Newly available. So it on one hand this HTMLElement could be replaced with HTMLElement|SVGElement|MathMLElement, it seems better to just go with Element and to use the getAttribute() method which is guaranteed to be present everywhere. Also, the target property of IntersectionObserverEntry is defined as Element.

@westonruter westonruter merged commit ec4941d into trunk May 8, 2025
30 of 32 checks passed
@westonruter westonruter deleted the improve/od-static-issues branch May 8, 2025 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Optimization Detective Issues for the Optimization Detective plugin skip changelog PRs that should not be mentioned in changelogs [Type] Bug An existing feature is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants