Commit Graph

20446 Commits

Author SHA1 Message Date
Rodrigo Primo
893f96f180 Replace Segment model with Doctrine code in WPTest
[MAILPOET-5066]
2023-10-26 11:36:07 -05:00
Rodrigo Primo
3bb9d744f3 Replace SubscriberSegment model with Doctrine code in WPTest
[MAILPOET-5066]
2023-10-26 11:36:07 -05:00
Rodrigo Primo
05a8d698d2 Replace Subscriber model with Subscriber entity in WPTest
[MAILPOET-5066]
2023-10-26 11:36:07 -05:00
Rodrigo Primo
95568e770b The minimum supported PHP version in PHPCS checks should be 7.3
[MAILPOET-5681]
2023-10-26 16:17:58 +02:00
Oluwaseun Olorunsola
58e031df13 Fix CircleCI zip file downloader
MAILPOET-5679
2023-10-26 14:25:38 +03:00
Rostislav Wolny
7069f97d68 Hide block margins in the editor canvas
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
98c0741ee8 Fix missing CSS for editor when Gutenberg is active
We use the post editor CSS files for the layout styles of the email editor.
When the Gutenberg plugin is active, editor styles are loaded from the plugin directory,
which was not allowed in our ConflictResolver

This commit allows fetching CSS from the Gutenberg plugin folder.
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
5dfacc9083 Adjust email document styles in editor canvas
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
df1562cfa1 Add support for spotlight mode
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
f0e8a074f2 Add support for fixed toolbar
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
aeaadf7cab Add error notice when email saving fails
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
c390e860ed Add default and snackbar notices
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
0abc7bae9a Enable media upload button for image block
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
554b862bf3 Enable media upload
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
6b7cd39dc1 Add keyboard shortcuts support
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
bfa87d7548 Render email editor UI after the email is loaded
This prevents the initial rendering of an empty editor.
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
afe2cd562a Remove unnecessary CSS queueing for the email editor
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
df663464fc Add Clear block selection functionality
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
75ab5e845d Enable rich text formating features
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
9f0e015f44 Load core editor setting as the base settings for the email editor
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
b4b7a5b6d2 fixup! Move layout into block editor 2023-10-26 10:43:00 +02:00
Rostislav Wolny
4d9fbd8d11 Focus Block tab in sidebar on block selection
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
db8dcd38db Move layout into block editor
With this change, we can get rid of Slots/Fills for ListView, Library, and Block Inspector.
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
d3b37f0463 Fix duplicate entity fetch request
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
30cdac6674 Fix scrolling in editor inserter
[MAILPOET-5637]
2023-10-26 10:43:00 +02:00
Rodrigo Primo
46f317563e Don't thrown an exception if data is incorrect
See https://github.com/mailpoet/mailpoet/pull/5238#discussion_r1371462690

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
040ed6fa80 Minor improvement: use ScheduledTaskEntity::getSendingQueue()
Using it to avoid using $this->queue->id

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
d4a80c7230 Move SendingQueueEntity::toArray() to SendingQueuesResponseBuilder::build()
Based on a suggestion during the review of the PR, it was decided that
it makes more sense for the code that was created as
SendingQueueEntity::toArray() tp be moved to
SendingQueuesResponseBuilder::build(). It is used only to build the
format that is send in the API response.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
69736c5e83 Fix typo in error message
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
508fdd7756 Refresh Doctrine entities in SendingQueue::add() to avoid issues
Since SendingQueue::add() still uses Paris, it was running into some
problems caught by our integration tests since some Sending methods
where refactored to Doctrine. The issue was that we started loading some
Doctrine entities earlier, then Paris code inside SendingQueue::add()
would change the same rows, causing the Doctrine entities to contain
stale data. To workaround this problem, in this commit, we are making
sure that the Doctrine entities are refreshed after they are changed by
Paris.

I considered refactoring SendingQueue::add() to use Doctrine but I
wasn't sure what to do with SendingTask::create() and
SendingTask::createFromQueue() so I decided to take a different
approach.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
dc1cee5118 Replace Newsletter model with NewsletterEntity in SendingQueue
This was the easiest way to fix failing integration tests related to
updating some Sending methods to use Doctrine instead of Paris. Using
Paris in SendingQueue to update the database was creating a state where
Doctrine had stale data and this was causing the tests to fail.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
18d34202a8 Remove remaining uses of the ScheduledTaskSubscriber model from Sending
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
63a0f0b940 Remove \MailPoet\Tasks\Subscribers class now that it is not used anymore
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
8b4e747499 Refactor Sending::saveSubscriberError() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
11f8de4176 Add integration test for Sending::saveSubscriberError()
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
d5cb060cb5 Refactor Sending::delete() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
2b368141db Refactor updateProcessedSubscribers() to use Doctrine instead of Paris
It was necessary to update a test to be more lenient when comparing
dates and another one to persist a change in Paris to the database.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
c0a091de04 Add the ScheduledTaskEntity as a property to the Sending class
Doing this instead of having to get the ScheduledTaskEntity in several
methods of this class.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
9f48427b1c Update test coverage for updateProcessedSubscribers()
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
4e633f64fb Remove unused method removeAllSubscribers()
This method was added in c0c57f6b67 but
its only usage besides integration test was removed in
18a6a1c439. It doesn't seem like it is
still used in our code base.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
fefaf174cd Refactor Sending::removeSubscribers() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
59d4ce3ba2 Update checkCompleted() to also change the processedAt field
This commit updates the method ScheduledTaskSubscribersRepository::checkCompleted() to update the processedAt field of the Scheduled Task. The method was added in f62d9b4167 and I believe it is meant to be a replacement to \MailPoet\Tasks\Subscribers::checkCompleted(). The original method updates the processedAt field, so I'm assuming the new method should update as well. I found this while working on refactoring \MailPoet\Tasks\Sending::removeSubscribers() to use Doctrine as this method calls \MailPoet\Tasks\Subscribers::checkCompleted() internaly.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
9c766c2f32 Fix typo
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
6b56a3ab7f Improve test coverage for Sending::removeSubscribers()
[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
veljko
d8da748b7b Updated selectors for k6 test to reflect new segmentation
[MAILPOET-5675]
2023-10-25 13:32:52 +02:00
Rodrigo Primo
57129bd460 Deprecate \MailPoet\Models\ScheduledTaskSubscriber::setSubscribers()
This model is no longer used since Sending::setSubscribers() was
refactored in a previous commit.

[MAILPOET-4368]
2023-10-25 10:31:45 +02:00
Rodrigo Primo
8fd8b8f193 Refactor Sending::setSubscribers() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 10:31:45 +02:00
Rodrigo Primo
b252043dac Refactor Sending::getSubscribers() to use Doctrine instead of Paris
[MAILPOET-4368]
2023-10-25 10:31:45 +02:00
Rodrigo Primo
eb16cca0da Improve test coverage for Sending::getSubscribers()
[MAILPOET-4368]
2023-10-25 10:31:45 +02:00
Rodrigo Primo
52ebb9562c Replace ScheduledTaskSubscriber model with corresponding entity in SendingTest
[MAILPOET-4368]
2023-10-25 10:31:45 +02:00