-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
DPMMA-1696 optionally stop engaging after closing the focus #12742
DPMMA-1696 optionally stop engaging after closing the focus #12742
Conversation
Codecov Report
@@ Coverage Diff @@
## 5.1 #12742 +/- ##
=========================================
Coverage 58.70% 58.70%
- Complexity 33646 33647 +1
=========================================
Files 2182 2182
Lines 101873 101875 +2
=========================================
+ Hits 59801 59804 +3
+ Misses 42072 42071 -1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we do it so complicated?
Why we just after close do not set mautic_focus_id to -1 same like after submission
Focus.cookies.setItem('mautic_focus_{{ focus.id }}', -1, Infinity, '/'); |
@kuzmany sure, we could use
|
@patrykgruszka Ok, understand. I prefer simplicity, but cannot block it just for that reason. Thanks. I will test it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made basic tests and it works on my side.
It needs rebase onto 5.1 |
0d95faa
to
da39693
Compare
@patrykgruszka this needs a small update to the docs on this page: https://docs.mautic.org/en/5.x/channels/focus_items.html - could you do that? cc @mautic/education-team for 5.1 release. |
Docs are now done: mautic/user-documentation#273 |
Description:
This PR adds a new option to the focus item builder to stop engaging when the user directly closes the focus (using the x key).
The implementation is similar to the existing Stop engaging after a conversion and is based on cookies. Therefore, the focus will no longer be displayed until the visitor clears their cookies.
Steps to test this PR: