Introduce UI for managing Performance Lab standalone plugins.#864
Merged
felixarntz merged 118 commits intofeature/creating-standalone-pluginsfrom Nov 21, 2023
Conversation
…es-to-standalone-plugins
…ation-ui-from-old-modules-to-standalone-plugins
… plugin managment UI and REST endpoints.
…in applicable load files, enqueue necessary scripts for settings screen.
…dules-to-standalone-plugins
… plugin install actions.
…rocess triggering UI and JS errors.
…Press/performance into feature/creating-standalone-plugins
…settings-screen-manage-standalone-plugins
Member
… of github.com:WordPress/performance into issue/651-pl-settings-screen-manage-standalone-plugins
…ons within plugin cards.
Co-authored-by: Weston Ruter <[email protected]>
Co-authored-by: Weston Ruter <[email protected]>
Co-authored-by: Weston Ruter <[email protected]>
Co-authored-by: Weston Ruter <[email protected]>
Co-authored-by: Weston Ruter <[email protected]>
Co-authored-by: Weston Ruter <[email protected]>
Contributor
Author
… of github.com:WordPress/performance into issue/651-pl-settings-screen-manage-standalone-plugins
felixarntz
requested changes
Nov 20, 2023
Member
felixarntz
left a comment
There was a problem hiding this comment.
@10upsimon As you've pointed out already, there's at least one issue with "over-escaped" content.
Contributor
Author
|
@felixarntz this is ready for the final review, I've removed the over escaping on the author output as identified in a prior comment. I've also removed the unnecessary package-lock.json file change, simply checking out the last commit when this file changed for a reason (10 Aug 2023). This file had changed due to initial iterations I had done on this issue, prior to the refactoring where we decided to use as much of core's |
3 tasks
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Addresses: #651
Relevant technical choices
PerformanceLab\Plugin_Managerclassget_standalone_plugins()static method as a means to reference the available standalone plugins. This will need to be updated in PL plugin releases as more standalone plugins are released to the WordPress plugin directory.render_plugins_ui()static method as a catch all use-once method to handle rendering of the standalone plugins UI within the PL setting screen. Used withinadmin/load.phpas the main means of rendering the view. This borrows heavily from cores implementation of the UI viaPlugins > Add New.render_plugin_card()static method that handles rendering of the UI for each individual plugin card. This borrows heavily from cores implementation of the UI viaPlugins > Add New.admin/load.phpperflab_render_modules_page()function to include a call toPlugin_Manager::render_plugins_ui()in order to render the standalone plugins UI as the first UI section within the PL settings screen.perflab_handle_inline_plugin_actions()hooked to actionadmin_initin order to successfully redirect the end user back to the PL Settings screen upon activation or deactivation of a standalone plugin from the standalone plugins UI rendered within the PL settings screen.perflab_admin_scriptshooked to actionadmin_enqueue_scriptsin order to:updatesscript, used to handle plugin actions within the rendered UI as a result ofPerformanceLab\Plugin_Manager::render_plugins_ui().updatesscript viawp_localize_script()and provide the following data:settingsAn array of settings necessary for correct functionality ofpluginsscript, most notably thetotalskey which contains plugin update totals, facilitate via a call towp_get_update_data(). Without this, theupdatesscript does not function as intended as it utilizes this data for retrieving and updating data stores.thickboxscript, necessary for correct lightbox handling from within each plugin UI card.thickboxstyle, necessary for correct lightbox appearance as triggered from within each plugin UI card.Checklist
[Focus]orInfrastructurelabel.[Type]label.no milestonelabel.