Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Use AJAX for activating features / plugins in Performance Lab #1646
Use AJAX for activating features / plugins in Performance Lab #1646
Changes from 20 commits
47f3938
9d97f59
6f172ad
337da6c
58c37d9
a59909d
f9faaea
770d462
e6710a3
c3d3588
fdf7e0b
b3ecc98
c713e47
1ebe323
c134fe2
369487f
d84e9bd
9bee27e
ce217ba
fa5d869
3a333ae
6250658
a8d89a8
c593ae6
e0691bf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this validates against the list of PL features/plugins, should we include an
enum
entry here with the possible values?If that feels like too much, I think we should at least mention it in the description, e.g. "Must be one of the Performance Lab feature slugs."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially proposed using an
enum
here, but it won't work unless we then also alwaysrequire
the additional admin-only PHP files used in PerfLab. So what is implemented with thisvalidate_callback
is a sort of just-in-time enum. This is already explained in the phpdoc forperflab_validate_slug_endpoint_arg()
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SG. In that case let's just mention it in the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like so? https://github.com/WordPress/performance/pull/1646/files#r1844278835