fix: command palette icons, console noise, and WP 7 progressive enhancements#776
Conversation
- Fix wp.icons not available: wp.icons has never existed as a WP global. Icons now use wp.primitives (SVG/Path), the same approach WP core uses in @wordpress/core-commands. Guarded for when primitives is unavailable. - Remove all console.log/console.error statements (10 total). - Add WP 7 progressive enhancements (safely ignored on WP 6.x): - Command categories (view/action) for grouped palette UI - Keywords on all commands for better search matching - wp.compose.useDebounce with setTimeout fallback - Replace wp-components dep with wp-compose (components was unused). - Remove unused i18n strings from localized script data.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 0 minutes and 14 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
|
Performance Test Results Performance test results for d7b96a9 are in 🛎️! Note: the numbers in parentheses show the difference to the previous (baseline) test run. Differences below 2% or 0.5 in absolute values are not shown. URL:
|
Summary
DetailsIcons (the main bug)The old code checked for Progressive enhancement matrix
PHP changes
Testing
Merged via PR #776 to main. aidevops.sh v3.6.235 spent 12m on this as a headless bash routine. |
Summary
wp.icons not availablespam:wp.iconshas never existed as a WordPress global. Icons now usewp.primitives(SVG/Path) — the same approach WP core uses in@wordpress/core-commands. Guarded so commands still register without icons when primitives is unavailable.category(view/action) — WP 7+ groups commands with labels in the palette UIkeywordson all commands — WP 7+ uses these for additional search matching (e.g. typing "billing" finds Payments)wp.compose.useDebouncefor search withsetTimeoutfallbackDetails
Icons (the main bug)
The old code checked for
wp.iconswhich doesn't exist in any WordPress version. The@wordpress/iconspackage is an npm build-time dependency — each consuming package bundles icons inline usingwp.primitives.SVGandwp.primitives.Path. This is now what we do, matching the pattern in WP core'score-commands.js.Progressive enhancement matrix
categoryactionkeywordswp.primitivesiconsnull— commands render without iconswp.compose.useDebouncesetTimeout(250ms)PHP changes
wp-componentsdependency withwp-compose(components was unused)i18nstrings fromwp_localize_scriptdataTesting
[Ultimate Multisite]messages, nowp.iconswarnings)