Commit Graph

20468 Commits

Author SHA1 Message Date
Rostislav Wolny
aa5cbc5511 Load email post from hardcoded post id
[MAILPOET-5603]
2023-10-17 16:06:06 +02:00
Rostislav Wolny
f309a5febd Fix Inserter and ListView
They need to be placed inside the block editor provider
Another option could be wrapping the layout into the block editor provider
[MAILPOET-5603]
2023-10-17 16:06:06 +02:00
Rostislav Wolny
ed21fb63f7 Attempt to add listview
[MAILPOET-5603]
2023-10-17 16:06:06 +02:00
Rostislav Wolny
61d2b5074d Add inserter sidebar
[MAILPOET-5603]
2023-10-17 16:06:06 +02:00
Rostislav Wolny
ac6197ea71 Add store and main sidebar with block inspector
[MAILPOET-5603]
2023-10-17 16:06:06 +02:00
Rostislav Wolny
07576b9f79 Render basic block editor with header
[MAILPOET-5603]
2023-10-17 16:06:06 +02:00
Rostislav Wolny
1919d58973 Add JS build and an index file for the editor app
[MAILPOET-5603]
2023-10-17 16:06:06 +02:00
Rostislav Wolny
debbeaafdc Add EmailEditor page into MailPoet admin
[MAILPOET-5603]
2023-10-17 16:06:06 +02:00
Jan Jakes
821681db0b Fix missing padding in floating editor settings panels
[MAILPOET-5654]
2023-10-17 12:41:28 +02:00
Jan Jakes
d1be5887c2 Ensure Lodash doesn't override Undesrcore on "window._"
This is a better fix than the previous ones in JS, as it should cover all assets
that can use Lodash, and it reverts back to the WP Underscore instance.

[MAILPOET-5653]
2023-10-17 12:41:28 +02:00
Jan Jakes
daab7d8c11 Ensure @wordpress/hooks is never installed in multiple instances
This ensures that all methods imported from @wordpress/hooks write to the same
instance and thus "addFilter" used in one part of the code works with "applyFilters"
called in another place.

In the future, we should use DependencyExtractionWebpackPlugin to always access
the window.wp.hooks object rather than bundling @wordpress/hooks with our code.

[MAILPOET-5653]
2023-10-17 12:41:28 +02:00
alex-mpoet
645f6678c5 Release 4.32.0 2023-10-17 13:28:15 +03:00
Jan Lysý
66bf725e2c Update acceptance test for preview
[MAILPOET-5635]
2023-10-16 12:19:15 +02:00
Jan Lysý
fb9a9566f1 Update Gutenberg acceptance test
[MAILPOET-5635]
2023-10-16 10:56:15 +02:00
Jan Lysý
6a3cd53d2d Redesign new editor modal
[MAILPOET-5635]
2023-10-16 10:56:15 +02:00
Jan Lysý
e900b0e9e1 Add button group with dropdown
[MAILPOET-5635]
2023-10-16 10:56:15 +02:00
John Oleksowicz
64624e017b Store sendContextValue in state
MAILPOET-5512
2023-10-16 10:22:22 +02:00
John Oleksowicz
d08343f215 Convert saveDraftNewsletter to async
MAILPOET-5512
2023-10-16 10:22:22 +02:00
John Oleksowicz
cc34ed42db Create variable for new segment URL
MAILPOET-5512
2023-10-16 10:22:22 +02:00
John Oleksowicz
53bc5a2505 Ensure filter segments display for draft/scheduled
This is only tangentially related to this ticket. I noticed during
testing that the filter segment tag was not showing up in listings for
standard newsletters that were drafts or scheduled. This is because
options weren't included in the response for standard newsletters.

MAILPOET-5512
2023-10-16 10:22:22 +02:00
John Oleksowicz
fa86703637 Change to kebab case
MAILPOET-5512
2023-10-16 10:22:22 +02:00
John Oleksowicz
3ee2017bd1 Redirect to send step after creating segment
If the user creates a segment specifically as a filter segment for an
email, we should redirect them to that email's send step after a
successful save.

MAILPOET-5512
2023-10-16 10:22:22 +02:00
John Oleksowicz
003a28e444 Add Create new segment link to filter segment
A note on using context: we need to be able to save the draft of the
newsletter before redirecting users to the segment creation page,
otherwise they might unexpectedly lose their work. The link exists in
a field, so the alternative to using a context seemed to be passing this
 function down as a prop, first to the Form and then to all of the
 fields, whether they needed it or not. This seemed clunky at best, and
 require changes to Form and Fields that get used many other places in
 the plugin.

 Using a context was the cleanest solution I could come up with for
 avoiding those changes.

MAILPOET-5512
2023-10-16 10:22:22 +02:00
David Remer
8fbac3e2c2 Release 4.31.1 2023-10-13 18:09:52 +03:00
Jan Jakes
e9833006ad Fix media library being empty in some cases
[MAILPOET-5656]
2023-10-13 18:09:52 +03:00
John Oleksowicz
43107ac823 Add note about filters to SubscriberTag
MAILPOET-5632
2023-10-13 11:21:42 +02:00
John Oleksowicz
bbb1a133fb Don't allow saving of lookup data to throw unhandled errors
It's not a critical error if we aren't able to save this lookup data,
and we wouldn't want it to interfere with the sending of a newsletter,
but we should log it as an error for debugging purposes.

MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
9b7296979e Don't attempt to use WC functions if not enabled
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
b1dd110bf8 Add lookup data retrieval for used shipping method
For ease of lookup, I changed the helper to return an array with keys
corresponding to the instanceId of the shipping methods. I couldn't see
anywhere else in the codebase where the keys would have mattered.

MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
97a53cb1aa Add lookup data retrieval for used payment method
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
c4fc8649f4 Add lookup data retrieval for used coupon code
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
67cff8992e Add lookup data retrieval for woo product
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
9d8fb08026 Add lookup data retrieval for woo category
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
54461d89ba Add lookup data retrieval for wordpress user role
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
d1f77d3ee5 Add lookup data retrieval for subscribed to list
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
af9a6cbb67 Add lookup data retrieval for subscribed via form
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
40785d047e Add lookup data retrieval for custom fields
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
6da760e754 Add lookup data filter to subscriber tag
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
beda4f8d89 Add lookup data retrieval for email filters
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
984aa81f86 Add lookup data retrieval for automation filters
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
cce390688c Add convenience methods for param retrieval
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
12362c0399 Update filter interface for lookup data
This method is intended to store the actual names of things that might
change or be deleted in the future, so we can include accurate
information when showing what the snapshot of the filter was at the time
.

MAILPOET-5625
2023-10-13 11:21:42 +02:00
Jan Lysý
eace314009 Use wpLocalizeScript instead of wpAddInlineScript in Email editor
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
bc5d0cb203 Use createInterpolateElement instead of ReactStringReplace in send-preview-email
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
5fce014a60 Fix email dataSchema in EmailApiController
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
5b21b74794 Add acceptance test for sending preview
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
2b58bbd7b1 Add displaying error and success message
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
e5e04e63e2 Add sending email after click on button
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
98542966aa Introduce MailPoet store
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
de66b3fea1 Add JS variables for email editor
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00