Skip to content

Mod. Banners. Bringing banners to a unified look with apbct - #699

Merged
AntonV1211 merged 3 commits into
devfrom
trial_renew_banner_av
Jul 31, 2026
Merged

AntonV1211 merged 3 commits into
devfrom
trial_renew_banner_av

Conversation

@AntonV1211

Copy link
Copy Markdown
Contributor

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 updates the SPBC admin “trial fullpage” banner to a unified trial/renew fullpage layout and aligns styling/behavior across PHP markup, settings JS dismissal handling, and CSS.

Changes:

  • Expand the fullpage banner display logic to cover both trial and renew scenarios.
  • Rename/standardize the banner DOM classes and sessionStorage dismissal key, and update JS behavior accordingly.
  • Rework banner layout and styling (header/CTA placement, responsive behavior) and update compiled JS/CSS assets.

Reviewed changes

Copilot reviewed 4 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/CleantalkSP/SpbctWP/AdminBannersModule/AdminBanners/AdminBannerTrialFullpage.php Updates show-logic and rewrites fullpage banner markup/classes, adds renew CTA variants
js/src/spbc-settings.js Updates dismissal key and selectors for the renamed fullpage banner
js/spbc-settings.min.js Rebuilt minified settings script reflecting the new dismissal key/selectors
js/spbc-settings.min.js.map Rebuilt sourcemap to match updated settings script
css/src/spbc-settings.css Reworks fullpage banner overlay layout and responsive styles for the new banner classes
css/src/spbc-admin.css Adjusts shared banner button styling and adds banner error notice styles
css/spbc-settings.min.css Rebuilt minified settings CSS reflecting the new fullpage banner styles
css/spbc-admin.min.css Rebuilt minified admin CSS reflecting shared banner style changes
Files not reviewed (2)
  • css/spbc-admin.min.css: Generated file
  • css/spbc-settings.min.css: Generated file
Comments suppressed due to low confidence (3)

lib/CleantalkSP/SpbctWP/AdminBannersModule/AdminBanners/AdminBannerTrialFullpage.php:185

  • Links opened with target="_blank" should include rel="noopener noreferrer" to prevent reverse-tabnabbing and to avoid leaking the window object to the opened page.
                                <a href="<?php echo esc_url($data['renewal_link']); ?>" target="_blank" class="spbc-banner-button spbc-banner-button-red"><?php echo esc_html($data['btn_upgrade']); ?></a>

lib/CleantalkSP/SpbctWP/AdminBannersModule/AdminBanners/AdminBannerTrialFullpage.php:249

  • This CTA text is hardcoded and not localized, and it diverges from the configured $data['btn_upgrade'] label used elsewhere. Prefer using the existing localized label (or a translation function) and keep the external-link attributes consistent.
                        <div class="spbc-trial-renew-upgrade">
                            <a class="spbc-trial-renew-upgrade-link" href="<?php echo esc_url($data['renewal_link']); ?>">Upgrade now</a>
                        </div>

css/src/spbc-settings.css:898

  • .spbc-banner-desc-block-row no longer sets display:flex, but the markup relies on gap (inline style) and inline icon/text alignment. Without flex/grid layout, gap won’t apply and the row alignment regresses.
.spbc-banner-desc-block-row {
	line-height: 22px;
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread css/src/spbc-settings.css
@AntonV1211
AntonV1211 merged commit 8367c31 into dev Jul 31, 2026
3 checks passed
@AntonV1211
AntonV1211 deleted the trial_renew_banner_av branch August 12, 2026 05:58
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