Skip to content

Links from backend.ab#796

Open
alexander-b-clean wants to merge 4 commits into
devfrom
links-from-backend.ab
Open

Links from backend.ab#796
alexander-b-clean wants to merge 4 commits into
devfrom
links-from-backend.ab

Conversation

@alexander-b-clean
Copy link
Copy Markdown
Contributor

@alexander-b-clean alexander-b-clean changed the base branch from master to dev May 17, 2026 11:18
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.98%. Comparing base (d8cb1f6) to head (3686bcb).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
inc/cleantalk-admin.php 33.33% 4 Missing ⚠️

❌ Your patch check has failed because the patch coverage (33.33%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev     #796      +/-   ##
============================================
+ Coverage     25.86%   25.98%   +0.11%     
- Complexity     5604     5606       +2     
============================================
  Files           264      264              
  Lines         24116    24128      +12     
============================================
+ Hits           6238     6269      +31     
+ Misses        17878    17859      -19     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Centralizes construction of CleanTalk “blacklists” links (including UTM parameters) on the PHP backend and passes the resulting URL templates to admin edit-screen scripts via localized data, replacing hardcoded URL building in JavaScript.

Changes:

  • Added a new LinkConstructor UTM preset (admin_blacklists_avatar_link) and tests covering it.
  • Extended CtPublicLocalize::getData() to expose a links array containing {TARGET} URL templates.
  • Updated users/comments edit-screen JS (and minified artifacts) to use localized link templates instead of concatenating URLs/UTM params.

Reviewed changes

Copilot reviewed 7 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/ApbctWP/TestCleanTalkLinks.php Adds unit tests for the new backend link preset and generated URL.
tests/ApbctWP/Localize/TestCtPublicLocalize.php Adds tests asserting links exist in localized public data and match expected templates.
lib/Cleantalk/ApbctWP/Localize/CtPublicLocalize.php Adds backend-generated link templates to localized data.
lib/Cleantalk/ApbctWP/LinkConstructor.php Introduces the new UTM preset used to build blacklists links.
js/src/cleantalk-users-editscreen.js Switches to backend-provided link templates for blacklists links.
js/src/cleantalk-comments-editscreen.js Switches to backend-provided link templates for blacklists links.
js/cleantalk-users-editscreen.min.js.map Updates sourcemap to reflect the new JS logic.
js/cleantalk-users-editscreen.min.js Updates minified bundle to reflect the new JS logic.
js/cleantalk-comments-editscreen.min.js.map Updates sourcemap to reflect the new JS logic.
js/cleantalk-comments-editscreen.min.js Updates minified bundle to reflect the new JS logic.
inc/cleantalk-admin.php Localizes the backend-provided link templates into ctCommentsScreen/ctUsersScreen.

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

Comment thread inc/cleantalk-admin.php
Comment thread inc/cleantalk-admin.php
Comment thread js/src/cleantalk-users-editscreen.js
Comment thread js/src/cleantalk-comments-editscreen.js
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.

4 participants