Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close #6863 Add termly compatibility #7198

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

Khadreal
Copy link
Contributor

@Khadreal Khadreal commented Dec 19, 2024

Description

Exclude Termly from delay and defer when applicable.

Fixes #6863

Type of change

  • Enhancement (non-breaking change which improves an existing functionality).

Detailed scenario

Check #6863

Technical description

Documentation

Exclude Termly resources if termly_display_auto_blocker is set 'on'

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.
  • Output messages (errors, notices, logs) are explicit enough for users to understand the issue and are actionnable.

Copy link

codacy-production bot commented Dec 19, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 9acceae1 76.92% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (9acceae) Report Missing Report Missing Report Missing
Head commit (7290425) 38241 16741 43.78%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#7198) 13 10 76.92%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@Khadreal Khadreal marked this pull request as ready for review December 19, 2024 14:16
@Khadreal Khadreal requested a review from a team December 19, 2024 14:16
Copy link
Contributor

@jeawhanlee jeawhanlee left a comment

Choose a reason for hiding this comment

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

It's good we have a unit test for this, but I think an integration test for this scenario would be helpful for testing with a html template containing that kind of link we are trying to exclude to see if the regex works properly.

inc/ThirdParty/Plugins/Cookie/Termly.php Outdated Show resolved Hide resolved
inc/ThirdParty/Plugins/Cookie/Termly.php Outdated Show resolved Hide resolved
@Khadreal Khadreal requested a review from jeawhanlee December 20, 2024 12:45
@Khadreal Khadreal requested a review from a team December 23, 2024 04:39
@Khadreal Khadreal self-assigned this Dec 23, 2024
@Mai-Saad
Copy link
Contributor

Mai-Saad commented Dec 23, 2024

@Khadreal Thanks for the PR. using the PR , can see that termly script is not excluded from deferjs /delay js
here https://new.rocketlabsqa.ovh/about. can you please check 🙏
Screenshot from 2024-12-23 17-43-32
Screenshot from 2024-12-23 17-46-43
For test:
1- When termly has termly_display_auto_blocker on in options table => we exclude https://app.termly.io/resource-blocker/ from defer js , delay js (try defer only on , delay only on , both on , all js modifications on) {it's already on in newlabs} => confirm that no console error/warning before/after interaction with the page
2- When termly option is off termly_display_auto_blocker , we aren't excluding the script from delay js / defer js

@Khadreal
Copy link
Contributor Author

@Mai-Saad pushed a fix and tested that it's working now.

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.

Compatibility with Termly
4 participants