[SMTNC-2395] Include catalog changelog in plugin and theme update data - #195
[SMTNC-2395] Include catalog changelog in plugin and theme update data#195mauteri wants to merge 1 commit into
Conversation
Plugin::get_update_data() and Theme::get_update_data() only ever emitted a "description" section, so on sites licensed with a unified key the WordPress "View details" modal showed nothing but the catalog description. For Kadence Blocks Pro that description is the one-line tagline, which customers read as a release with no notes. The catalog already carries the changelog and Catalog_Feature exposes it via get_changelog(). Add it as a "changelog" section when present so the modal renders a Changelog tab, matching what the legacy Uplink path returns. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughPlugin and theme update data now includes non-empty catalog changelogs in a ChangesCatalog changelog integration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Plugin and theme update details now show a Changelog tab when catalog content is available, while sites without a changelog retain their existing description-only behavior. The covered conditional behavior presents no remaining merge-readiness risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 4 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
shvlv
left a comment
There was a problem hiding this comment.
It looks good from my side
|
Note, this will depend on this change to Portal: https://github.com/stellarwp/software.liquidweb.com/pull/435 |
Fixes SMTNC-2395
Problem
On sites licensed with a unified key, Harbor answers
plugins_api( 'plugin_information' )for its features.Plugin::get_update_data()andTheme::get_update_data()only ever emit adescriptionsection, so the WordPress "View details" modal shows one Description tab and nothing else.For Kadence Blocks Pro the catalog description is the one-line tagline ("Adds Extras for Gutenberg"), so the 2.8.18 update looked like a release with no notes. Customers raised it in the Web Creator Community group on Sept 2 (Pete Gregory's post; Gary Yates reported the same for Shop Kit). The legacy Uplink path, which only runs when there is no unified key, returns a
changelogsection for the same product, so the content exists on the server side.Change
The catalog already carries
changelogandCatalog_Feature::get_changelog()exposes it (docs/subsystems/portal.mddocuments it as "consistent withplugins_api()sections").get_update_data()now adds it as achangelogsection when it is non-null and non-empty, for both Plugin and Theme.Plugin_Handler::to_wp_format()andTheme_Handlerpasssectionsthrough unchanged, so the modal gets a Changelog tab.No change when the catalog has no changelog:
sectionsstays['description' => ...].Tests
Added to
PluginTestandThemeTest: changelog present, changelog null, changelog empty string.slic run wpunit --filter 'PluginTest|ThemeTest|Plugin_HandlerTest|Theme_HandlerTest'on PHP 8.2: 77 tests, 222 assertions, all six new tests pass. One pre-existing error unrelated to this change:Plugin_HandlerTest::test_it_proxies_plugins_api_to_wporg_slug_when_slugs_differfails locally withCall to undefined function plugins_api()becausewp-admin/includes/plugin-install.phpis not loaded in the test bootstrap. That test andPlugin_Handler.phpare untouched here.phpcsandphpstanclean on the changed files.Demo
Before and after on Harbor's wp-env fixture site (unified fixture key,
kad-blocks-prostub installed):mainshows a single Description tab, this branch adds the Changelog tab.Before

After
Loom walkthrough: https://www.loom.com/share/64100270e64f4d809f3ff6b04a8c42a9
Rollout
Harbor ships inside each host plugin, so customers see the tab once Kadence Blocks (and the other hosts) bump to a Harbor release containing this. Companion PR that fixes the "View full changelog" link Blocks Pro appends: stellarwp/kadence-blocks-pro#307.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes