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

Move Optimization Detective docs into README.md #1763

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from

Conversation

westonruter
Copy link
Member

@westonruter westonruter commented Dec 19, 2024

After the most recent release of Optimization Detective, I discovered that the plugin directory has a 2,500 word limit for readme.txt files. And Optimization Detective now exceeds the limit:

image

This is resulting in the readme being truncated:

image

So this PR moves the Background, Technical Foundation, Use Cases/Examples, and Hooks into a README.md which is then linked to from the readme.txt. The initial two paragraphs of the plugin description are retained in both places for context. Sections are also added for installation, feedback, support, contributing, and security. There is also a new section added for extension plugins.

This also further improves the OD-related plugin readmes with a notice that the REST API must be available to unauthenticated visitors. See #1731.

@westonruter westonruter added [Type] Documentation Documentation to be added or enhanced no milestone PRs that do not have a defined milestone for release [Plugin] Optimization Detective Issues for the Optimization Detective plugin labels Dec 19, 2024
Copy link

github-actions bot commented Dec 19, 2024

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: swissspidy <[email protected]>
Co-authored-by: felixarntz <[email protected]>

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

@westonruter
Copy link
Member Author

westonruter commented Dec 19, 2024

  • The formatting of the accepted arguments to each action/filter could be added and improved.

@westonruter
Copy link
Member Author

westonruter commented Dec 19, 2024

Also good to add, although not necessary immediately:

  • How to write an extension
  • Class reference
  • Function reference
  • JSON Schema
  • Remove access private from anything exposed by filters or hooks
  • Extract hooks docs from PHPDoc?

@felixarntz
Copy link
Member

Maybe we should add a dedicated docs folder, or a Wiki, or something like that? The documentation needs for OD would probably justify a dedicated location like that.

@westonruter
Copy link
Member Author

I thought about a Wiki too, but @joemcgill suggested a README due to it being easier to keep up to date in code (as changes can land with new features in PRs). At the same time, edits are also burdensome since they have to go through the PR process. In any case, I think a README as a landing page makes sense and then we can break out sections into separate docs pages, whether that be in a docs subdirectory or a Wiki (which we'd have to enable for the repo, but then why not use the Handbook?)

* [Optimization Detective Store Query Vars](https://github.com/westonruter/od-store-query-vars): Stores the Query Vars with a URL Metric in the Optimization Detective plugin. This is useful for debugging URL Metrics, in particular what the slug was computed from.
* [Optimization Detective Store User Agent](https://github.com/westonruter/od-store-user-agent): Stores the User Agent with a URL Metric in the Optimization Detective plugin. This is useful for debugging URL Metrics, in particular to understand what device has a given viewport dimensions.
* [Optimization Detective Dev Mode](https://github.com/westonruter/od-dev-mode): Adds filters to facilitate development of the Optimization Detective plugin.

Copy link
Member Author

@westonruter westonruter Dec 24, 2024

Choose a reason for hiding this comment

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

Suggested change
* [Optimization Detective Content Visibility](https://github.com/westonruter/od-content-visibility): Applies content-visibility to posts in The Loop to improve rendering performance.
* [Optimization Detective Intrinsic Dimensions](https://github.com/westonruter/od-intrinsic-dimensions): Supplies width and height attributes to IMG and VIDEO tags that lack them according to their intrinsic dimensions. This reduces Cumulative Layout Shift (CLS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no milestone PRs that do not have a defined milestone for release [Plugin] Optimization Detective Issues for the Optimization Detective plugin [Type] Documentation Documentation to be added or enhanced
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants