Commit Graph

21722 Commits

Author SHA1 Message Date
Rodrigo Primo
48dc2d7507 Fix layout of the number of reviews segment in the segment edit page
See https://github.com/mailpoet/mailpoet/pull/5174#issuecomment-1746542729

[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
0bdb1d6f77 Fix layout of the wordpress role segment in the segment edit page
See https://github.com/mailpoet/mailpoet/pull/5174#issuecomment-1746542729

[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
b008839e81 Rename two files to match the new enforced standard
A PR was merged to trunk enforcing the use of the kebab case pattern for
file and directory names. This commit changes the name of a directory
and two files that were created before the PR was merged.

[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
2e0281f7ab Improve contrast of the font of two elements in the segment edit page
[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
e6577b9a28 Fix layout of some segment conditions in the segment edit page
This commit changes the layout of the conditions of some segments in the segment
edit page so that they are better displayed in the new design (all the
modified segments contain at least one select box with potential long
optons).

To do that it removes the two remaining Grid.CenteredRow components and also
replaces isFullWidth with isMinWidth for the smaller select boxes in the
same condition.

[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
3e61104d11 Change FieldWrapper component to make the slug prop optional
This prop is not used when title, which is already optional, is not set.

Check https://github.com/mailpoet/mailpoet/pull/5174#discussion_r1338962220 for a discussion on the limitations of <FieldWrapper> and how we can
improve it in the future

[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
12fa602695 Attempt to fix the design of the segment conditions
This commit attempts to fix the design of the segment conditions in the
segment edit page when there are long items in a select box. To do that,
it removes the two remaining Grid.CenteredRow components and also
removes the `dimension='small'` from the `<ReactSelect>` component.

It is only applied to the <EmailClickStatisticsFields> component so that
we can test it and then after expand to the other components if there
are no further changes that we want to make.

[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
9246dd7154 Declare type of two variables
Doing this to hopefully workaround the following ESLint error that John
is seeing in his local env
(https://github.com/mailpoet/mailpoet/pull/5174#discussion_r1334663426):

ESLint: Invalid type "any" of template literal expression.(@typescript-eslint/restrict-template-expressions)

[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
87b0b0b4f3 Remove unnecessary !important
It turns out `!important` is needed only for `display` and not for
`align-items`.

[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
3340cc0c69 Use absolute paths instead of relative paths for imports
[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
6b60754436 Improve two terms used in the code based on feedback from PR review
[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
c9a52ab82e Implement adjustments to the filter selector to fit in the new design
[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
a86b71510d Replace premium banner with the new premium modal and display badge
[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
2644bea226 Implement new design for the main elements of the segment edit page
[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
8448bc67f9 Use WP functions instead of MP functions for i18n in form.tsx
[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
a116066e06 Update design of the header of the segment edit page
Parts of this design was already implemented on the segment template
page. The CSS was moved to a common placed and reused in both pages.

[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Jan Jakes
435350254c Update readme with current information about i18n usage
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
9e825d9157 Keep entrypoint asset name as script name, remove unnecessary check
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
0411ed2c37 Enqueue Parsley translation strings in after "admin_vendor"
This is a better place and it corresponds to the current logic.

[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
16c51717b7 Fix timing of "mailpoet_scripts_admin_before" actioon trigger
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
113d710eb4 Call "mailpoet_styles_admin_after" from page renderer
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
ab6beb3c21 Fix issue with loadash overriding underscore on window._
Fixes: TypeError: this.activateMode is not a function
See also: https://github.com/mailpoet/mailpoet/pull/4977/files

[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
bb801597af Remove Twig CSS asset macro
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
68b585c544 Remove "after_css" block
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
312f85efdd Enqueue all styles using WP native functions
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
470d8f1aea Remove Twig JS asset macro
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
dae575888a Inline analytics JS
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
420a9c41e0 Use WP logic to enqueue Parsley validation strings
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
ed76bbf3d6 Invoke "mailpoet_scripts_admin_before" from the asset controller
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
2a676353aa Render "after_javascript" block after other scripts
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
3106b19684 Remove translation blocks ("localize" now enqueues scrips directly)
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
54ebd5855a Enqueue inline translations from Twig templates after mailpoet.js
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
282f7b8414 Enqueue all admin scripts using WP native functions
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
480d9f1239 Extract admin pages assets setup out of form assets controller
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
John Oleksowicz
fe58ed5c55 Convert to kebab case
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
b488691b47 Disable filter segment if subscriber limit reached
This also consolidates a couple of places where we are checking premium
status. One side effect is that the Google Analytics field will now also
 be disabled if the subscriber limit has been reached, which I believe
 is the desired behavior.

MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
df27277ed6 Fix react warning with date field values
This isn't specific to this ticket but I noticed it while testing. React
 is throwing a warning about the input switching from uncontrolled to
 controlled after entering a value for an "in the last" or "not in the
 last" date field. This is because segment.value is undefined at first.
 Setting the default to an empty string instead prevents the issue.

MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
36c2b7a82b Update styles for filter segment
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
1858a38889 Disable filter segment if premium inactive
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
f5b3d1123d Allow boolean or callback for disabled prop
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
d389a1d574 Replace existing send to fields with extracted version
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
6867190677 Extract send to fields and include filter segment
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
4bc6660eec Create recipient count component
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
7b57db7385 Create filter segment component
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
087e776745 Update and fix types
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
673a1ab0fd Ensure correct parameter types
It's not enough to just merge the parameters. Without merging types as
well, array parameters aren't handled correctly.

MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
a2d04e93c5 Add endpoint to retrieve count for multiple segments
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
6b2b35b541 Add ability to get count filtered by segment
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
fd1c476901 Update labels
MAILPOET-5510
2023-10-04 12:59:38 +02:00
David Remer
fc5a2c4168 Use kebab-case
[MAILPOET-5212]
2023-10-03 19:14:30 +02:00