feat!: Rescaffold repo with separate Features and Experiments namespaces [WIP]#309
feat!: Rescaffold repo with separate Features and Experiments namespaces [WIP]#309justlevine wants to merge 12 commits intodevelopfrom
Features and Experiments namespaces [WIP]#309Conversation
includes/Experiments/Experiments.php
Outdated
| */ | ||
| public function init(): void { | ||
| $experiments = array( | ||
| 'abilities_explorer' => \WordPress\AI\Experiments\Abilities_Explorer\Abilities_Explorer::class, |
There was a problem hiding this comment.
Stable keys so classes can stay removed/overloaded even if they graduate.
Long term we should just turn Abstract_Feature::get_id() into an abstract public static method instead of a metadata property, but that would touch a lot of other files and method internals and can be done as a followup PR
| * @since x.x.x | ||
| */ | ||
| class Experiment_Category { | ||
| class Experiment_Category extends Feature_Category { |
There was a problem hiding this comment.
I'm fine with graduating Experiment_Category::ADMIN and Experiment_Category::EDITOR too, this is more to illustrate that experiment categories are a potential superset of Feature_Categories
|
See also the related part of my comment left in #287 (comment):
In this context, it would also make it easier to promote an experiment to a stable feature with minimal code changes. |
9bb15bf to
0bc37bd
Compare
In the latest commit 74a17d4 I changed I believe all the public breaking stuff is handled in this current branch. There's room for some more pre WP7.0 cleanup (migrations, settings, constants) but those can be done in isolation. I'm going to start parcelling this off into individual PRs for review. |
74a17d4 to
5b0b172
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #309 +/- ##
=============================================
- Coverage 58.72% 57.11% -1.62%
- Complexity 573 590 +17
=============================================
Files 37 41 +4
Lines 2951 3078 +127
=============================================
+ Hits 1733 1758 +25
- Misses 1218 1320 +102
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
5b0b172 to
3f2a2fb
Compare
3f2a2fb to
14a8f14
Compare
What?
Closes
Note
I plan to reset/rebase and otherwise clean up all this before I put it up for review, so might make sense to save code-specific feedback for later and focus now on the structural.
Illustrative work in progress - the final proposal will likely be split into several PRs to handle the general scaffold cleanup versus specific work to decouple
FeaturesfromExperimentsWhy?
How?
The broader takeaways:
Features/*are where the graduated features live (once we have them)The primary Loader + Registry lives in the root.
Individual features are namespaced.
Experiments/are where our (current and future) Experiments liveClasses are loaded by hooking into the
Features/Loaderwith the*_feature_classesfilter, so we can dogfood our own apis.Other scaffolding/slop like the non-psr4 files in our root, sorting method names, splitting the settings screen into features + experiments still need to happen, some can happen in parallel.
Todo
Use of AI Tools
GitHub Copilot Autocomplete
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast