New trial renew banners av#834
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #834 +/- ##
============================================
+ Coverage 27.55% 28.08% +0.52%
- Complexity 5824 5854 +30
============================================
Files 282 285 +3
Lines 24711 24853 +142
============================================
+ Hits 6810 6979 +169
+ Misses 17901 17874 -27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR refactors admin notice banners into a new AdminBannersModule structure, adds a full-page trial/renew banner for the settings screen, and updates tests/assets/styles to support the new banner UX.
Changes:
- Introduces
AdminBannerAbstractand new banner implementations for review + trial/renew (including a full-page settings overlay variant). - Updates
AdminNoticesto render banners via the new module and removes the legacyApbctBannerReview. - Adds/updates PHPUnit tests and updates admin JS/CSS to support dismiss behavior and new banner styling.
Reviewed changes
Copilot reviewed 21 out of 27 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/ApbctWP/TestApbctBannerReview.php | Updates review banner tests to target the new AdminBannerReview. |
| tests/ApbctWP/TestAdminBannerTrialAndRenewFullpage.php | Adds coverage for the new full-page trial/renew banner behavior. |
| tests/ApbctWP/TestAdminBannerTrialAndRenew.php | Adds coverage for the new inline trial/renew admin banner behavior. |
| lib/Cleantalk/Common/API.php | Modifies notice_paid_till response patching (currently introduces always-on notice flags). |
| lib/Cleantalk/ApbctWP/ApbctBannerReview.php | Removes legacy review banner implementation. |
| lib/Cleantalk/ApbctWP/AdminNotices.php | Switches trial/renew + review notices to new banner classes. |
| lib/Cleantalk/ApbctWP/AdminBannersModule/AdminBannerTrialAndRenewFullpage.php | Adds full-page trial/renew banner rendering + session-dismiss logic. |
| lib/Cleantalk/ApbctWP/AdminBannersModule/AdminBannerTrialAndRenew.php | Adds new inline admin trial/renew banner implementation. |
| lib/Cleantalk/ApbctWP/AdminBannersModule/AdminBannerReview.php | Adds new admin review banner implementation with dismiss window. |
| lib/Cleantalk/ApbctWP/AdminBannersModule/AdminBannerAbstract.php | Introduces a shared base class for banner show/dismiss logic. |
| js/src/cleantalk-admin-settings-page.js | Adds dismiss handler for the full-page banner. |
| js/prebuild/apbct-public-bundle.js | Regenerated bundle changes (iframe handler renames). |
| js/prebuild/apbct-public-bundle_int-protection.js | Regenerated bundle changes (iframe handler renames). |
| js/prebuild/apbct-public-bundle_int-protection_gathering.js | Regenerated bundle changes (iframe handler renames). |
| js/prebuild/apbct-public-bundle_gathering.js | Regenerated bundle changes (iframe handler renames). |
| js/prebuild/apbct-public-bundle_full-protection.js | Regenerated bundle changes (iframe handler renames). |
| js/prebuild/apbct-public-bundle_full-protection_gathering.js | Regenerated bundle changes (iframe handler renames). |
| js/prebuild/apbct-public-bundle_ext-protection.js | Regenerated bundle changes (iframe handler renames). |
| js/prebuild/apbct-public-bundle_ext-protection_gathering.js | Regenerated bundle changes (iframe handler renames). |
| js/cleantalk-admin-settings-page.min.js.map | Updates sourcemap reflecting new dismiss handler. |
| js/cleantalk-admin-settings-page.min.js | Updates minified build reflecting new dismiss handler. |
| inc/images/check.svg | Adds an icon asset used by the full-page banner benefits list. |
| inc/cleantalk-settings.php | Renders the full-page trial/renew banner instead of settings when conditions match. |
| css/src/cleantalk-admin.css | Adds shared styles for the new trial/renew banner button + notice styling. |
| css/src/cleantalk-admin-settings-page.css | Adds extensive styling for the new full-page banner layout. |
| css/cleantalk-admin.min.css | Minified output for updated admin CSS. |
| css/cleantalk-admin-settings-page.min.css | Minified output for updated settings-page CSS. |
Files not reviewed (2)
- css/cleantalk-admin-settings-page.min.css: Generated file
- css/cleantalk-admin.min.css: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Please make attention that frontend tests for banners are failed. |
https://app.doboard.com/1/task/52256