alleyinteractive / wp-alleyvate

Defaults for WordPress sites by Alley.
GNU General Public License v2.0
18 stars 2 forks source link

Feature: Site Health #57

Closed srtfisher closed 10 months ago

srtfisher commented 10 months ago
Screenshot 2023-12-06 at 4 47 30 PM

Adds a Site Health screen panel with information about the enabled/disabled features of the plugin.

Resolves #53.

Summary by CodeRabbit

coderabbitai[bot] commented 10 months ago

Walkthrough

The codebase has been updated to include a new Site_Health class that adds a section to the WordPress Site Health tool, displaying the status of Alleyvate features. This update also refactors the feature loading process, splitting the load function into available_features and load, and introducing should_load_feature to determine if a feature should be loaded. Additionally, a test class Test_Site_Health has been added to ensure the site health feature behaves as expected.

Changes

File Path Change Summary
src/.../features/class-site-health.php Added Site_Health class implementing Feature interface with boot and add_debug_information methods.
src/.../load.php Split load function into available_features and load, added should_load_feature function.
tests/.../features/test-site-health.php Added Test_Site_Health class extending Test_Case with setUp and test_site_health_feature methods.
tests/bootstrap.php Included "wp-alleyvate.php" file to introduce new functionality.

Assessment against linked issues

Objective Addressed Explanation
Add a new section to Site Health > Info called Alleyvate (#53)
Populate the section with read-only information about each feature, whether it is active or inactive (#53)

Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Note: For conversation with the bot, please use the review comments on code diffs or files. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json`