Native Plugins window + <wpd-card>#137
Merged
Merged
Conversation
- Implemented `<wpd-card>` component with interactive, selected, compact, and disabled states. - Added styles for the card component, including hover effects and responsive design. - Created unit tests for the card component to verify behavior for interactive and non-interactive states, click events, and keyboard interactions. - Developed PHP unit tests for the Plugins window registration, ensuring proper capability checks for different user roles. - Added REST and admin-ajax tests for the Plugins window, covering configuration, plugin activation, deactivation, deletion, and browsing functionality.
Collaborator
Author
|
@epeicher hey it would be nice, given your expertise in plugins directory, your valuable test and opinion on this new "marketplace" rework :) |
Contributor
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
Collaborator
Author
|
Actually, I'm going to merge. We can test it before the release. |
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.
Adds a first-class Plugins native window to replace the chromeless
plugins.php+plugin-install.phpiframes, plus a reusable<wpd-card>component for the gallery.Highlights
desktop-mode-plugins, opt-out vianativePluginsEnabled):<wpd-table>with name + status badge, version + update pill, author, disk size, per-row Activate / Deactivate / Delete + bulk actions. Live dock repaint after every mutation viawp.desktop.refreshMenu().<wpd-card>tiles with hover lift, lazy icons, and shimmer skeletons during pagination.<wpd-flyout>) with sticky hero, banner-clipped corners, glass-blur close button, and tabs for Overview / Screenshots / Reviews / Changelog / FAQ. Reviews are scraped from wp.org with a histogram-only fallback when parsing fails.wp_ajax_install_plugin(zero reimplementation, uses Core's'updates'nonce).wp_ajax_desktop_mode_plugins_uploadaccepts a multipart upload or drag-drop a .zip onto the window.wp.desktop.registerSystemTile(). Payload type'wporg-plugin'is hookable so plugin authors can register their own drop targets.New surfaces
desktop_mode_plugins_window_user_can_register|use|caps,*_args|template_html|browse_args|browse_response|info_response|review_parser|icon_url, actiondesktop_mode_plugins_window_installed. REST-field decorators on/wp/v2/plugins:desktop_mode_update_available,desktop_mode_can_manage,desktop_mode_icon_url,desktop_mode_size_kb. AJAX actions:wp_ajax_desktop_mode_plugins_{browse,info,reviews,upload}.wp.desktop.createSharedStore('desktop-mode/plugins-window/tab-target')for initial-tab routing;OsSettingsState.nativePluginsEnabled+ Features toggle.<wpd-card>—interactive,selected,compact,disabled,wpd-card-clickevent,[data-noclick]-aware, slot rhythms for<header>/<footer>.Notable fixes (during this branch)
<wpd-table>cell content now uses inline styles (cells live in shadow DOM; document CSS doesn't reach them — same posture posts-window uses).<wpd-flyout>'s off-screen translate — root container is nowposition: relative+overflow-x: hidden.encodePluginPath) keeps slashes literal for Apache's defaultAllowEncodedSlashes Off.wpd-pick, notwpd-segmented-change).cursor: not-allowed, bump animation, tooltip,aria-disabled) on pinned tiles like My WordPress — silent until the user actually attempts a drag.Plugin Check posture
Plugin_Upgrader,WP_Filesystem,plugins_api()all touched only fromwp_ajax_*callbacks (the same idiom Core'swp_ajax_install_pluginuses) — norequire_once ABSPATH . 'wp-admin/…'in REST runtime paths.Tests
plugins-window-rest.test.ts(11),wpd-card.test.ts(8), updateddesktop-files-drag.test.ts. 1064/1064 passing.pluginsWindowRegistration.phpcovers cap gates, opt-in round-trip, REST-field decorators, icon-URL filter.Docs
docs/hooks-reference.md+docs/javascript-reference.md.docs/examples/plugins-window-extras.md(curated browse filter, icon override, reviews-parser swap, install action, deep-link to Browse, accept-card drop target).Verification
Plus manual QA in the dev environment: install a plugin from Browse, deactivate from Installed, drop a .zip on the window, drag a card to the dock, switch tabs, open detail flyout, hard-refresh — all live, no F5 between steps.