| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…source link to available focus areas.
…ectory and include tests including demo test data.
|
I tested this with #32 and it worked well in my testing, giving me the module as a setting: |
Sorry, something went wrong.
| * 'name'. | ||
| */ | ||
| function perflab_get_focus_areas() { | ||
| return array( |
There was a problem hiding this comment.
I wonder if we shouldn't dynamically get the focuses from the modules header. On one hand it is more dynamic on the other it can easily result too undesired results due to typo or else. Thoughts?
Also, I do think that we may need an additional focus area for the "Infrastructure/API" modules.
Sorry, something went wrong.
There was a problem hiding this comment.
I think having these defined in a central location helps providing guidance on what to specify in the module header, and it also allows us to provide any extra information about a focus area (e.g. if in the future we wanted to add descriptions for each focus to the settings screen).
Adding a new focus area would be straightforward, it would only require a PR to expand this array (and it already requires a workflow anyway, as it will need a new GitHub label to be created as well).
Regarding something for "Infrastructure/API", I think that goes into the area of dependencies, or modules that go beyond a single focus. Maybe better to open a separate issue to discuss that, since it's a larger topic? Also it might be hard to evaluate this early as we aren't yet in a situation where it would be needed.
Sorry, something went wrong.
… test data from actual modules.
| Back | FazBrowse Home | New Git URL |
This PR implements the performance plugin's settings screen to toggle the available modules on/off, as outlined in #27.
Screenshot with demo modules:

Note that by default right now the screen will be empty, since there are no modules yet. For testing, you can easily recreate the experience from the above screenshot by changing https://github.com/WordPress/performance/pull/30/files#diff-cb909f9aba14cf3fa470fc35d1a245d296c4341882b13e95f46f16a4a82f2fdaR60 to $modules = perflab_get_modules( dirname( __DIR__ ) . '/tests/testdata/modules' );.
Fixes #27