Commit Graph

15254 Commits

Author SHA1 Message Date
Rodrigo Primo
30d44186bd Refactor ImportExportFactoryTest to use Doctrine instead of Paris
[MAILPOET-4139]
2022-05-23 11:37:26 +02:00
Rodrigo Primo
e5fa37caa1 Add method to CustomField factory to be able to set the field type
This will be used in a subsequent commit when refactoring
ImportExportFactoryTest to use Doctrine instead of Paris.

[MAILPOET-4139]
2022-05-23 11:37:26 +02:00
Jan Lysý
3bd49fbc27 Fix annotation in AutomatedEmails
[MAILPOET-4308]
2022-05-19 14:18:18 +02:00
Jan Lysý
5ab04b8b22 Remove usage constant from the old model
[MAILPOET-4338]
2022-05-19 14:18:06 +02:00
Sam Najian
87294e8751 Release 3.89.2 2022-05-19 12:02:36 +02:00
Jan Lysý
a41eca2355 Add missing env variables to integration tests
[MAILPOET-4382]
2022-05-19 11:12:56 +02:00
Jan Jakes
b29b1fe51f Fix form editor crash with old "below_post" value
[MAILPOET-4381]
2022-05-19 10:30:32 +02:00
Jan Jakes
d9c47a40f2 Add permissions to manage automations
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
73776206cc Unify focus styles with WP
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
3d2a5afb65 Use plus icon from @wordpress/icons
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
fa310415a6 Display step inserter in a popover when add-step-button clicked
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
8cc2bb5b61 Display workflow details in workflow sidebar
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
91c9b31364 Open step sidebar on step selection, display step details
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
8a764c92bf Save current step to store when selected
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
f30a148344 Render line separator and an add-step-button between workflow steps
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
44e4d41694 Serialize and render workflow steps
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
901e3309cd Make workflow a composite for keyboard navigation and a11y, add root styles
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
ca0516b03b Add basic automation workflow component
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
63a24ffa69 Use workflow name from data store in sidebar
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
b01a6af124 Load workflow data into editor state
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
3dceb0f2e4 Load workflow data in editor template
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
9565e170c6 Add inserter component based on inserter from block editor & mocked data
See: 27ec8f65c9/packages/block-editor/src/components/inserter

[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
27afb211ba Add inserter listbox component based on listbox from block editor
See: 27ec8f65c9/packages/block-editor/src/components/inserter-listbox

[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
184ce081fb Add inserter toggle button to header
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
4983fb8dec Add basic workflow step inserter sidebar and its state
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
8b45dffd3a Add showIconLabels state for consistency with post editor
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
97807e27d9 Add keyboard shortcuts for fullscreen and sidebar toggle
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
ae8ae8a4fc Implement two-tabbed sidebar content and its state
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
be29ee04a6 Add basic sidebar
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
071a028fbd Add header "more" menu with fullscreen toggle
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
16b0229c44 Add basic header with heading and save draft & publish buttons
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
27b1c46c15 Add fullscreen mode
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
5b3ad3d8ba Add basic @wordpress/data store with fullscreen mode state
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
2273dd9e16 Add basic interface skeleton setup
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
49f4eaed16 Add Gutenberg styles to automation editor
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
10c397d3e5 Add automation editor React setup
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
ed4fea6afa Add send welcome email action to the testing workflow
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
30d3a9250c Install @wordpress/a11y explicitly, add @types/wordpress__a11y
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
d63a8bfd83 Install @wordpress/preferences explicitly
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
4fc1af1f56 Install @wordpress/interface explicitly
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
2c18b851e4 Add automation editor page
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
2584864228 Display a list of workflows on automation page
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
3660d12dd0 Return workflow list data in workflows endpoint
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
47c5111996 Add method to fetch list of workflows to workflow storage
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Jan Jakes
1b46765f47 Fix workflow date loading
[MAILPOET-4287]
2022-05-19 10:09:05 +02:00
Rodrigo Primo
a6724a41c0 Fix: invisible ReCaptcha works when there are multiple forms in the page
There was a bug in the code that handles the invisible ReCaptcha that
was preventing the forms from working when this setting is activated and
the user submits a form that is not the first form on the page.

The code that calls the ReCaptcha API when the invisible ReCaptcha is
used was not passing the ID of the ReCaptcha instance. This meant that
for all the forms, ReCaptcha would call the callback associated with the
first form. That is why the other forms were not working.

The fix was simply making sure we pass the ReCaptcha ID when we call
grecaptcha.execute().

[MAILPOET-4145]
2022-05-19 09:22:30 +02:00
Rodrigo Primo
f75ed915fb Reset the ReCaptcha when there is an error
This commit makes sure we reset the ReCaptcha when there is an error so
that the form continues to work and that the user can fix the error and
submit the form again. This was affecting only the invisible ReCaptcha.

For more information on the problem that is fixed by this commit, see
https://github.com/mailpoet/mailpoet/pull/4084#pullrequestreview-959001922

[MAILPOET-4145]
2022-05-19 09:22:30 +02:00
Rodrigo Primo
02adf6adc9 Only display ReCaptcha sign up link if ReCaptcha is selected
This commit changes the logic to display the link to sign up for
ReCaptcha API keys in the advanced settings page. Before the link was always
visible, now it will be visible only if one of the two supported
ReCaptcha checks are selected.

[MAILPOET-4145]
2022-05-19 09:22:30 +02:00
Rodrigo Primo
ba47f0b854 Rename variables to make the ReCaptcha code easier to understand
This commit renames two variables to make it easier to understand the
code responsible for adding a ReCapcha to a subscription form:

formData.recaptcha -> formData.recaptchaWidgetId
formData.data.recaptcha -> formData.data.recaptchaResponseToken

Before this change it was harder to understand the difference between
formData.recaptcha and formData.data.recaptcha since they used the same
name.

[MAILPOET-4145]
2022-05-19 09:22:30 +02:00
Rodrigo Primo
909e59ca1f Fix jQuery selectors for the invisible ReCaptcha
The original code that added suport for the invisible ReCaptcha assumed
an HTML structure for all the subscription forms that was invalid.
Different forms can have slightly different HTML structures. This meant
that the original code worked for some forms, but not for others.

This commit changes the jQuery selectors needed for the invisible
ReCaptcha to work to be more lenient (to search for a given element
in more than one level in the DOM tree) and to function on different
HTML structures.

[MAILPOET-4145]
2022-05-19 09:22:30 +02:00