Skip to content

Conversation

dadarya0
Copy link
Contributor

@dadarya0 dadarya0 commented Jun 19, 2024

MAUT-11343 : Guide users to build optimized segments

Q A
Bug fix? (use the a.b branch) 🔴
New feature/enhancement? (use the a.x branch) 🟢
Deprecations? 🔴
BC breaks? (use the c.x branch) 🔴
Automated tests included? 🟢
Related user documentation PR URL mautic/user-documentation#...
Related developer documentation PR URL mautic/developer-documentation-new#...
Issue(s) addressed Fixes #...

Description

Add warnings when users are using the below operators
Like : This Like filter will slow down instance performance. We recommend using “Starts with” if possible.
Contains : This Contains filter will slow down instance performance. We recommend using “Starts with” if possible.
Regexp : This Regexp filter will slow down instance performance. We recommend using “Starts with” if possible.
End with : This Ends With filter will slow down instance performance. We recommend using “Starts with” if possible.

Field: email
If any of the above operators is combined with the “Email” field, add another message: Consider using the “Email Domain” filter instead of “Email” to be able to match the email domain.


📋 Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Create a segment
  3. select filters which are mentioned in description
  4. Verify alert message text based on field and filter defined in description
  5. verify alert message should be persist on save and edit

MAUT-11343 : Guide users to build optimized segments
@dadarya0 dadarya0 changed the title Merge pull request #2172 from acquia/MAUT-11343 Guide users to build optimized segments Jun 19, 2024
@dadarya0 dadarya0 marked this pull request as ready for review June 19, 2024 08:56
Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 4 lines in your changes missing coverage. Please review.

Project coverage is 62.19%. Comparing base (b228705) to head (ed9a061).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##                5.x   #13860   +/-   ##
=========================================
  Coverage     62.18%   62.19%           
- Complexity    34224    34233    +9     
=========================================
  Files          2252     2253    +1     
  Lines        102341   102369   +28     
=========================================
+ Hits          63642    63666   +24     
- Misses        38699    38703    +4     
Files Coverage Δ
app/bundles/CoreBundle/Form/Type/AlertType.php 100.00% <100.00%> (ø)
...eadBundle/EventListener/TypeOperatorSubscriber.php 96.55% <78.94%> (-2.66%) ⬇️

@dadarya0 dadarya0 requested review from a team and escopecz and removed request for a team June 19, 2024 09:01
@dadarya0 dadarya0 added the unforking Used for PRs in the Acquia's unforking initiative label Jun 19, 2024
@escopecz escopecz added user-experience Anything related to related to workflows, feedback, and navigation enhancement Any improvement to an existing feature or functionality segments Anything related to segments performance-scalability Anything related to performance and scalability labels Jun 19, 2024
Copy link
Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

I have a few nitpicks, but it would be great if we'd agree that it's how it should be. Perhaps I could automate this with some more PHPSTAN/Rector/CSFixer rules.

@escopecz escopecz added the pending-feedback PR's and issues that are awaiting feedback from the author label Jun 19, 2024
dadarya0 and others added 2 commits June 20, 2024 14:15
Co-authored-by: John Linhart <admin@escope.cz>
@dadarya0 dadarya0 removed the pending-feedback PR's and issues that are awaiting feedback from the author label Jun 20, 2024
@dadarya0 dadarya0 requested a review from escopecz June 20, 2024 08:53
Copy link
Contributor

@andersonjeccel andersonjeccel left a comment

Choose a reason for hiding this comment

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

Works as mentioned

@andersonjeccel andersonjeccel added the pending-test-confirmation PR's that require one test before they can be merged label Jun 21, 2024
Copy link
Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

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

Thanks Saurabh! 👍

@escopecz escopecz added this to the 5.2 milestone Jun 21, 2024
@escopecz escopecz merged commit 40eae64 into 5.x Jun 21, 2024
@escopecz escopecz added code-review-passed PRs which have passed code review and removed pending-test-confirmation PR's that require one test before they can be merged labels Jun 21, 2024
andersonjeccel pushed a commit to andersonjeccel/mautic that referenced this pull request Jun 24, 2024
* Merge pull request mautic#2172 from acquia/MAUT-11343

MAUT-11343 : Guide users to build optimized segments

* fix twig file issue

* Apply suggestions from code review

Co-authored-by: John Linhart <admin@escope.cz>

* push suggested changes

---------

Co-authored-by: John Linhart <admin@escope.cz>
andersonjeccel added a commit to andersonjeccel/mautic that referenced this pull request Jun 24, 2024
escopecz added a commit that referenced this pull request Jun 27, 2024
* [UI] Replaces table action button `arrow-down` with `more-2` icon (#13841)

* [UI] Replaces table action button `arrow-down` with `more-2` icon

This replaces the icon for the action toggle button in tables (e.g. contact list table or segment list table) with a 3 dot icon.

The previous arrow down icon indicates that an collapsed element would get unfolded/shown. This is not the case in these tables. The button shows more actions. In any UI that I know a 3 dot icon is used for that.

The arrow down icon would be more suitable if it would show more details on click. Hence, this PR.

* TASK: Reverts change for `page_actions.html.twig`

Co-authored-by: Anderson, from Dropsolid <116097999+andersonjeccel@users.noreply.github.com>

---------

Co-authored-by: Anderson, from Dropsolid <116097999+andersonjeccel@users.noreply.github.com>

* add js code to hide profile pic if missing (#13838)

* Segment membership as a new filter for dynamic email content (#13528)

* Merge pull request #1088 from mautic-inc/MAUT-4688

Maut 4688 - Use segment membership as a filter for dynamic content in email

* Changes needed after rebase to M5

* Merge pull request #1407 from acquia/MAUT-5729

MAUT-5729 Dynamic Content Error - Segment Membership filter not showing correct content

* Fixing STAN

* CS fixes

* Test fix

* test fix part 2

* Adding back JS methods removed in a bad conflict resolution

---------

Co-authored-by: Lukáš Drahý <lukas@drahy.net>
Co-authored-by: Rohit Pavaskar <66303837+rohitp19@users.noreply.github.com>
Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>

* [UI] Increased icon size (#13825)

* increased icon size

* decrease by 1px

* Make the search regular expression match both "&" and "&amp;" for link replacement within an email body (#13858)

* Guide users to build optimized segments (#13860)

* Merge pull request #2172 from acquia/MAUT-11343

MAUT-11343 : Guide users to build optimized segments

* fix twig file issue

* Apply suggestions from code review

Co-authored-by: John Linhart <admin@escope.cz>

* push suggested changes

---------

Co-authored-by: John Linhart <admin@escope.cz>

* fix CSS flexbox broken in campaign insert clone view

* Revert "[UI] Replaces table action button `arrow-down` with `more-2` icon (#13841)"

This reverts commit fadcf26.

* Revert "Segment membership as a new filter for dynamic email content (#13528)"

This reverts commit 71031b7.

* Revert "[UI] Increased icon size (#13825)"

This reverts commit c00df3c.

* Revert "Make the search regular expression match both "&" and "&amp;" for link replacement within an email body (#13858)"

This reverts commit d3e6ceb.

* Revert "Guide users to build optimized segments (#13860)"

This reverts commit bdabc26.

* Revert "add js code to hide profile pic if missing (#13838)"

This reverts commit 76dd7d6.

---------

Co-authored-by: putzwasser <26040044+putzwasser@users.noreply.github.com>
Co-authored-by: John Linhart <admin@escope.cz>
Co-authored-by: Lukáš Drahý <lukas@drahy.net>
Co-authored-by: Rohit Pavaskar <66303837+rohitp19@users.noreply.github.com>
Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>
Co-authored-by: Miroslav Fedeleš <miroslav.fedeles@gmail.com>
Co-authored-by: Saurabh Gupta <48244990+dadarya0@users.noreply.github.com>
escopecz added a commit that referenced this pull request Jul 26, 2024
* Improve grammar for unhide (#13835)

* Improve grammar for unhide

* Fix test

* fix: LeadBundle template errors (#13862)

Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>

* [UI] fix CSS flexbox broken in campaign insert clone view (#13878)

* [UI] Replaces table action button `arrow-down` with `more-2` icon (#13841)

* [UI] Replaces table action button `arrow-down` with `more-2` icon

This replaces the icon for the action toggle button in tables (e.g. contact list table or segment list table) with a 3 dot icon.

The previous arrow down icon indicates that an collapsed element would get unfolded/shown. This is not the case in these tables. The button shows more actions. In any UI that I know a 3 dot icon is used for that.

The arrow down icon would be more suitable if it would show more details on click. Hence, this PR.

* TASK: Reverts change for `page_actions.html.twig`

Co-authored-by: Anderson, from Dropsolid <116097999+andersonjeccel@users.noreply.github.com>

---------

Co-authored-by: Anderson, from Dropsolid <116097999+andersonjeccel@users.noreply.github.com>

* add js code to hide profile pic if missing (#13838)

* Segment membership as a new filter for dynamic email content (#13528)

* Merge pull request #1088 from mautic-inc/MAUT-4688

Maut 4688 - Use segment membership as a filter for dynamic content in email

* Changes needed after rebase to M5

* Merge pull request #1407 from acquia/MAUT-5729

MAUT-5729 Dynamic Content Error - Segment Membership filter not showing correct content

* Fixing STAN

* CS fixes

* Test fix

* test fix part 2

* Adding back JS methods removed in a bad conflict resolution

---------

Co-authored-by: Lukáš Drahý <lukas@drahy.net>
Co-authored-by: Rohit Pavaskar <66303837+rohitp19@users.noreply.github.com>
Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>

* [UI] Increased icon size (#13825)

* increased icon size

* decrease by 1px

* Make the search regular expression match both "&" and "&amp;" for link replacement within an email body (#13858)

* Guide users to build optimized segments (#13860)

* Merge pull request #2172 from acquia/MAUT-11343

MAUT-11343 : Guide users to build optimized segments

* fix twig file issue

* Apply suggestions from code review

Co-authored-by: John Linhart <admin@escope.cz>

* push suggested changes

---------

Co-authored-by: John Linhart <admin@escope.cz>

* fix CSS flexbox broken in campaign insert clone view

* Revert "[UI] Replaces table action button `arrow-down` with `more-2` icon (#13841)"

This reverts commit fadcf26.

* Revert "Segment membership as a new filter for dynamic email content (#13528)"

This reverts commit 71031b7.

* Revert "[UI] Increased icon size (#13825)"

This reverts commit c00df3c.

* Revert "Make the search regular expression match both "&" and "&amp;" for link replacement within an email body (#13858)"

This reverts commit d3e6ceb.

* Revert "Guide users to build optimized segments (#13860)"

This reverts commit bdabc26.

* Revert "add js code to hide profile pic if missing (#13838)"

This reverts commit 76dd7d6.

---------

Co-authored-by: putzwasser <26040044+putzwasser@users.noreply.github.com>
Co-authored-by: John Linhart <admin@escope.cz>
Co-authored-by: Lukáš Drahý <lukas@drahy.net>
Co-authored-by: Rohit Pavaskar <66303837+rohitp19@users.noreply.github.com>
Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>
Co-authored-by: Miroslav Fedeleš <miroslav.fedeles@gmail.com>
Co-authored-by: Saurabh Gupta <48244990+dadarya0@users.noreply.github.com>

* DPMMA-1020 Fix search email with special characters in campaign action (#10306)

* fix: [DPMMA-1020] fix getLookupChoiceListAction for search with special characters

* fix: [DPMMA-1020] phpstan

* fix: focus item published (#13944)

* Update .gitpod.Dockerfile 5.1 branch (#13955)

* fix [DPMMA-2661] mapped field form 5.1 (#13938)

* fix: [DPMMA-2661] Correct form mapper Mautic 5

* feat: [DPMMA-2661] Correct CSFixer

* FIX: Removes onConfigSave which invokes htmlspecialchars and escapes tracking script (#13859)

This fixes #13355

This removes the HTML escaping logic in the onConfigSave method of `ConfigSubscriber`. This change prevents the UI from displaying escaped HTML in the custom tracking JS field after saving the form.

Previously, the form erroneously escaped HTML entities. By removing this code, users will now see the original HTML as expected when they revisit the form.

The main issue, however, was that re-saving  meant saving escaped HTML which would break inserting the tracking HTML code.

**Before**
1. Add custom HTML in `Configuration > Landing Page Settings > Analytics script (i.e. Google Analytics) `
2. Save
3. Open this view again → see escaped HTML
4. Save again
5. Open a landing page and see escaped HTML tracking code injected.

**After**
1. Add custom HTML in `Configuration > Landing Page Settings > Analytics script (i.e. Google Analytics) `
2. Save
3. Open this view again → see unescaped HTML
4. Save again
5. Open a landing page and see correct HTML tracking code injected.

* rename from tweet to tweets (#13967)

* Fix: Create custom fields for lookup list. (#13946)

* FIX: Makes `anniversary` date filter compatible with datetime (#13871)

* FIX: Makes `anniversary` date filter compatible with datetime

* TASK: Fix unit test

* FIX: $expectedResult docstring

---------

Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>
Co-authored-by: Frettyl <173093231+Frettyl@users.noreply.github.com>
Co-authored-by: Anderson, from Dropsolid <116097999+andersonjeccel@users.noreply.github.com>
Co-authored-by: putzwasser <26040044+putzwasser@users.noreply.github.com>
Co-authored-by: Lukáš Drahý <lukas@drahy.net>
Co-authored-by: Rohit Pavaskar <66303837+rohitp19@users.noreply.github.com>
Co-authored-by: Miroslav Fedeleš <miroslav.fedeles@gmail.com>
Co-authored-by: Saurabh Gupta <48244990+dadarya0@users.noreply.github.com>
Co-authored-by: Patryk Gruszka <patryk.gruszka@comarch.pl>
Co-authored-by: Tomasz Kowalczyk <39382654+tomekkowalczyk@users.noreply.github.com>
Co-authored-by: Martin Vooremäe <martin.vooremae@gmail.com>
Co-authored-by: Abhisek Mazumdar <abhisekmazumdar@users.noreply.github.com>
@escopecz escopecz deleted the guide_user_to_build_optimized_segment branch October 2, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-review-passed PRs which have passed code review enhancement Any improvement to an existing feature or functionality performance-scalability Anything related to performance and scalability segments Anything related to segments unforking Used for PRs in the Acquia's unforking initiative user-experience Anything related to related to workflows, feedback, and navigation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants