Commit Graph

20858 Commits

Author SHA1 Message Date
John Oleksowicz
628081a13a Fix analytics inclusion conditional
It wasn't intentional to make analytics dependent on whether or not the
site is an ecommerce plan or if the 3rd party library setting is enabled
. This ensures that analytic tracking will always actually be enabled
when the user opts in to it.

MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
3e8ccaa760 Don't rely on cookie for analytics public ID
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
c09409e1de Replace manual option field creation with factory
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
b54b66b5b2 Add NewsletterOptionField factory
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
2d4fd0aeab Remove user property reporting frontend code
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
23806b6395 Schedule initial mixpanel task
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
6e27fe58bc Add next run date logic for mixpanel reporting
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
168f72182c Extract method to retrieve next send date
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
4855aaaa93 Register mixpanel worker
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
933fb27265 Create cron worker for reporting mixpanel data
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
c809461322 Remove phpstan exception that no longer triggers
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
3e45bca0f9 Make methods public
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
010c15013f Extract analytics data generation method
MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
75b17ba0ba Don't clean newsletter_option_fields table
Option field records are created at plugin activation and some of our
code assumes at least one record will exist.

MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
95b7163593 Add mixpanel PHP library
I'm adding this unprefixed because the library contains code that
dynamically instantiates objects assuming that certain classes will
exist in the global namespace. If we definitely need to include this
library prefixed we would need to add some custom code to update those
references, and also double check that there are no other places we
might run into similar issues.

MAILPOET-5161
2023-10-23 17:40:54 +02:00
John Oleksowicz
e3a8db7de9 Ensure we're checking file extension
This prevents an error when adding packages whose names end in php

MAILPOET-5161
2023-10-23 17:40:54 +02:00
Jan Jakes
2956012e5b Remove conditions step errors on condition change
[MAILPOET-5587]
2023-10-23 17:09:16 +02:00
Jan Jakes
d9cc8ff80d Render branch badges in analytics
[MAILPOET-5587]
2023-10-23 17:09:16 +02:00
Jan Jakes
69e0ad86be Render branch curve leaves in analytics
[MAILPOET-5587]
2023-10-23 17:09:16 +02:00
Jan Jakes
de5723e416 Turn off drag and scroll handling for analytics rendering
[MAILPOET-5587]
2023-10-23 17:09:16 +02:00
Jan Jakes
62f2d1e773 Add registry subjects to automation analytics
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
3235bd704f Improve naming of filter strings
[MAILPOET-5587]
2023-10-23 17:09:16 +02:00
Jan Jakes
565222cb16 Improve translatability of filters/conditions chip label
[MAILPOET-5587]
2023-10-23 17:09:16 +02:00
Jan Jakes
87d90a44fd Fix error when step type is unknown
[MAILPOET-5587]
2023-10-23 17:09:16 +02:00
Jan Jakes
10d28da84c Implement drag-to-scroll for automation flow
[MAILPOET-5667]
2023-10-23 17:09:16 +02:00
Jan Jakes
412fc16fda Extract automation scroll centering to a custom hook
[MAILPOET-5587]
2023-10-23 17:09:16 +02:00
Jan Jakes
df9e582924 Implement new automation scrolling with simultaneous X and Y scroll support
This fixes horizontal scroll bar appearing only after scrolling till the end vertically.
Allows for simultaneous X and Y axis scrolling on trackpads and touch devices.

[MAILPOET-5587]
2023-10-23 17:09:16 +02:00
Jan Jakes
9e036244c4 Fix if/else step keywords
[MAILPOET-5587]
2023-10-23 17:09:16 +02:00
Jan Jakes
8471ea4caf Remove unnecessary translation function
[MAILPOET-5587]
2023-10-23 17:09:16 +02:00
Jan Jakes
c33da588af Validate that fields in filters are provided by subjects available in the automation
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
0203f6e3a3 Use "drawerRight" icon for editor sidebar (as in recent Gutenberg)
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
617b3fa796 Add badges for if-else branches
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
afb1737280 Fix filters chip not closing on click outside and ESC
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
131ac554af Add if-else step UI
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
002bb2f92a Center automation flow horizontally on first load
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
524298ff41 Implement rendering for multiple automation branches
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
d0726e348e Implement if/else action
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
f55c4f7755 Make next step ID nullable (ability to save multiple edges without next steps)
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
32e5d4f8ac Add check that next step was scheduled when multiple next steps are possible
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
72ce5fb569 Add a possibility to schedule next step by index
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
8720d8881f Remove NoSplitRule to allow for multiple next steps
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
004dc57f75 Fix edge case for NoUnreachableStepsRuleTest
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
Jan Jakes
901427c3d1 Fix edge case for NoJoinRule, simplify logic
[MAILPOET-5586]
2023-10-23 17:09:16 +02:00
John Oleksowicz
4c3ad15444 Move number of orders to correct section
Number of orders is a filter with a type WooCommerce. There is no
userRole filter with the same name.

MAILPOET-5503
2023-10-23 13:01:57 +02:00
John Oleksowicz
71560a032d Add tracking for new segments
MAILPOET-5503
2023-10-23 13:01:57 +02:00
John Oleksowicz
09173d7941 Update tracking for re-engagement/post notifications
MAILPOET-5595
2023-10-23 12:38:01 +02:00
John Oleksowicz
e64daa4aec Update Newsletter sent tracking data
MAILPOET-5595
2023-10-23 12:38:01 +02:00
John Oleksowicz
f81498da5c Track filter segment usage
MAILPOET-5595
2023-10-23 12:38:01 +02:00
alex-mpoet
f28ddabebc Update @babel/traverse
[MAILPOET-5671]
2023-10-20 09:48:51 -03:00
Rodrigo Primo
40f46220aa Fix imports that are causing errors in the premium build
For some unknown reason using the absolute paths in the files changed in
this commit is causing the error below in the premium build. To fix it,
this commit changes the code to use relative paths. I did not
investigate why this error was happening in the first place.

The error started happening when
https://github.com/mailpoet/mailpoet/pull/5213/ was merged.

```
> tsc --noEmit

../mailpoet/assets/js/src/segments/dynamic/dynamic-segments-filters/automation-options.ts:2:29 - error TS2307: Cannot find module 'segments/dynamic/dynamic-segments-filters/sort-filters' or its corresponding type declarations.

2 import { sortFilters } from 'segments/dynamic/dynamic-segments-filters/sort-filters';
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../mailpoet/assets/js/src/segments/dynamic/dynamic-segments-filters/email-options.ts:2:29 - error TS2307: Cannot find module 'segments/dynamic/dynamic-segments-filters/sort-filters' or its corresponding type declarations.

2 import { sortFilters } from 'segments/dynamic/dynamic-segments-filters/sort-filters';
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../mailpoet/assets/js/src/segments/dynamic/dynamic-segments-filters/subscriber-options.ts:2:29 - error TS2307: Cannot find module 'segments/dynamic/dynamic-segments-filters/sort-filters' or its corresponding type declarations.

2 import { sortFilters } from 'segments/dynamic/dynamic-segments-filters/sort-filters';
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../mailpoet/assets/js/src/segments/dynamic/dynamic-segments-filters/woocommerce-options.ts:2:29 - error TS2307: Cannot find module 'segments/dynamic/dynamic-segments-filters/sort-filters.ts' or its corresponding type declarations.

2 import { sortFilters } from 'segments/dynamic/dynamic-segments-filters/sort-filters.ts';
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 4 errors in 4 files.
```

https://app.circleci.com/pipelines/github/mailpoet/mailpoet-premium/2862/workflows/b1fa2ad0-fc50-40df-b278-c6ca709e6ce0/jobs/20223

[MAILPOET-5666]
2023-10-19 21:48:17 +03:00