Skip to content

New trial renew banners av#834

Open
AntonV1211 wants to merge 8 commits into
devfrom
new_trial_renew_banners_av
Open

New trial renew banners av#834
AntonV1211 wants to merge 8 commits into
devfrom
new_trial_renew_banners_av

Conversation

@AntonV1211

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.62376% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.08%. Comparing base (ccc895f) to head (8308fcf).

Files with missing lines Patch % Lines
lib/Cleantalk/ApbctWP/AdminNotices.php 0.00% 11 Missing ⚠️
inc/cleantalk-settings.php 0.00% 6 Missing ⚠️
...ApbctWP/AdminBannersModule/AdminBannerAbstract.php 61.53% 5 Missing ⚠️
...k/ApbctWP/AdminBannersModule/AdminBannerReview.php 97.05% 1 Missing ⚠️
...WP/AdminBannersModule/AdminBannerTrialAndRenew.php 98.18% 1 Missing ⚠️
...BannersModule/AdminBannerTrialAndRenewFullpage.php 98.79% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AdminBannerAbstract and new banner implementations for review + trial/renew (including a full-page settings overlay variant).
  • Updates AdminNotices to render banners via the new module and removes the legacy ApbctBannerReview.
  • 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.

Comment thread lib/Cleantalk/ApbctWP/AdminBannersModule/AdminBannerTrialAndRenewFullpage.php Outdated
Comment thread js/src/cleantalk-admin-settings-page.js
@alexandergull

Copy link
Copy Markdown
Member

Please make attention that frontend tests for banners are failed.

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.

3 participants