Skip to content

Harden Recommended Plugins section, drop admin-bar hint#23

Merged
akirk merged 1 commit into
mainfrom
improve-recommended-plugins-section
Apr 24, 2026
Merged

Harden Recommended Plugins section, drop admin-bar hint#23
akirk merged 1 commit into
mainfrom
improve-recommended-plugins-section

Conversation

@akirk

@akirk akirk commented Apr 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Recommended Plugins stopped loading intermittently: any per-slug plugins_api() failure caused ajax_get_recommended_plugins to continue, and a cached error array produced blank cards for up to an hour. Now every entry is returned with a JSON-metadata fallback (title/author/note), and the cached-error shape is detected correctly.
  • The "Recommended Plugins" sidebar entry was gated on hasPlugins, which was only true after the async enrichment fetch resolved. It's now rendered unconditionally with loading/failure states inside the content area.
  • Added a short intro paragraph above the list ("These plugins have been hand-picked as useful additions for a personal WordPress site.") and a "Browse all WordPress plugins →" link at the bottom pointing at plugin-install.php.
  • Removed the "Click here to come back!" admin-bar hint overlay, along with its dismiss AJAX handler, JS binding and CSS.

Test plan

  • Open the launcher as a logged-in admin: the hint overlay is gone.
  • Open the Install Software modal: "Recommended Plugins" appears in the sidebar immediately, even before the wp.org enrichment request resolves.
  • Open the Recommended Plugins section: intro text is visible at the top, the list renders, and the "Browse all WordPress plugins" link at the bottom opens plugin-install.php.
  • Simulate wp.org being unreachable (e.g. block api.wordpress.org or set a bogus transient): recommendations still render with titles/authors from the curated JSON, not blank cards or a missing section.
  • Confirm no leftover references to my-apps-hint / ajax_dismiss_hint in the plugin.

- Remove the admin-bar "Click here to come back!" hint overlay along
  with its dismiss AJAX handler, JS click binding and CSS.
- Recommended Plugins no longer vanish when wp.org is slow or
  unreachable: fall back to the bundled JSON metadata (title, author,
  categories, note) instead of dropping the entry, and fix the
  cached-error shape so a transient failure doesn't render a blank
  card for an hour.
- Always render the "Recommended Plugins" sidebar entry so the
  section is discoverable while the async enrichment fetch is in
  flight (or if it fails).
- Add a one-line intro above the list and a "Browse all WordPress
  plugins" link at the bottom pointing at plugin-install.php.
@akirk akirk merged commit 7f6eff9 into main Apr 24, 2026
@akirk akirk deleted the improve-recommended-plugins-section branch May 5, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant