Commit Graph

150 Commits

Author SHA1 Message Date
0173ddd38e Add inserting personalization tags to text blocks
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
29c1f7462a Add inserting personalization tags to subject and preheader
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
bbe2f988e0 Add onInsert callback into PersonalizationTags from store
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
74c2a99e80 Refactor category modal into smaller components
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
74e4b333ac Add search for filtering Personalization Tags by query
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
9282cf91c6 Add filtering personalization tags by category
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
d17faaa13a Add rendering Personalization tags to modal
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
2c031b01fc Add loading personalization to store
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
3a3b53545f Add personalization tags modal component
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
1d11502e93 Add personalizationTags state to custom editor
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
7f2f9ff7ca Add button with shortcode icon for subject and preheader
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
99d4c3bcaf Add button with shortcode icon into richText panel
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
1a9b711b1f Replace TextArea by RichText component in Email editor details panel
RichText component allows us using HTML comments for subject and preheader
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
cd9b8dab64 Add missing CSS for HTML comments in RichText
Because CSS for HTML comments in RichText is a part of BlockEditor,
and we want to minimize the plugin build, this commit adds the necessary CSS.
[MAILPOET-6387]
2024-12-18 09:54:39 +01:00
132c247d97 Update email-editor @wordpress/rich-text dependency to 7.14.0
[MAILPOET-6387]
2024-12-18 09:54:39 +01:00
43f7542c64 Improve the look of labels in the save items popup in the editor
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
bc10ae7216 Cleanup JS code from styles - template association
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
269b55ed08 Use current styles from the store for template previews in the selector
This commit ensures that templates are previewed with the latest styles
set in the editor. Previously, we were using the version sent from the server that
might be out of date.
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
6472021359 Update notice text when saving template or global styles
The code triggers the same notice for changes in a template or changes in global styles.
This commit makes the text of the notice more generic to work for both.
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
d1166edbd8 Cleanup user styles before applying
We need to remove empty values that may occur when the user resets a value.
These empty values prevent applying defaults coming from editor theme after reset.
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
c908cabcf6 Fix saving styles to save only user-edited props
There was a typo in StylesColorPanel property, and we were passing incorrect values.
StylesColorPanel.value expects user set values
StylesColorPanel.inheritedValue expects merged styles
See b66f9ff095/packages/edit-site/src/components/global-styles/screen-colors.js (L23-L28)
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
b5e8cf84c8 Fix issue with CSS variables in the style panel
Some components in the style setting (e.g., SpacingSizesControl) don't work
with the CSS variables when present in valid CSS form (e.g., var(--wp--preset--spacing--10)).
To prevent issues, we need to transform CSS variables to the shortened variant.
The core uses more sophisticated functions for that, see
f2ba0fdb4c/packages/block-editor/src/components/global-styles/utils.js (L307-L358)
The functionality is private, so I've created a simpler version.
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
ebe7151269 Remove code related to template themes
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
fdc0d15b63 Load user styles in the email editor properly
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
de03e84eb4 Use global styles aka user theme for editor styles
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
8f512a7967 Add hook for working with email global styles
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
f906cd686f Add functionality for fetching global styles from server
[MAILPOET-6335]
2024-12-17 10:36:39 +01:00
08ba9b1da9 Fix acceptance test
MAILPOET-5949
2024-12-09 17:06:48 +01:00
36130c9809 Ensure "Start from scratch" button sticks to the end of the modal
MAILPOET-5949
2024-12-09 17:06:48 +01:00
52a6122e74 Fix header and footer not showing for recent category email post templates
MAILPOET-5949
2024-12-09 17:06:48 +01:00
4f948dfd65 Filter out empty email post-content
MAILPOET-5949
2024-12-09 17:06:48 +01:00
f79c0cec55 Update template selector styles
MAILPOET-5949
2024-12-09 17:06:48 +01:00
a80a6bf5c5 Refactor SelectTemplateBody and use memo and useEffect when required to improve render performance
MAILPOET-5949
2024-12-09 17:06:48 +01:00
8661a169b3 Add basic optimization for usePreviewTemplates to improve render performance
MAILPOET-5949
2024-12-09 17:06:48 +01:00
bc0ce09d61 Add support for email-general and email-simple templates
The previous implementation only checks for email-general templates

MAILPOET-5949
2024-12-09 17:06:48 +01:00
fb5166ab7c Fix an edge case where it might be possible for email content to have similar post-slug
MAILPOET-5949
2024-12-09 17:06:48 +01:00
16e4346d07 Fix using sent email post content as new email editor page template
MAILPOET-5949
2024-12-09 17:06:48 +01:00
651e80b8f0 Fetch emailPosts for use in template selection modal
MAILPOET-5949
2024-12-09 17:06:48 +01:00
17bda157aa Add Selector to fetch mailpoet email editor post-types
MAILPOET-5949
2024-12-09 17:06:48 +01:00
c35bf6a008 Fix double sidebar header
The issue was fixed in @wordpress/interface but we were using
the older version.
The @wordpress/interface is not distributed standalone in WP Core
so we bundle it.
[MAILPOET-6371]
2024-12-09 14:47:09 +01:00
e181725127 Change the texts in the component with changes to save to match email context
This should be removed after the upstream
contextualize the template texts to match associated post types or uses more generic texts.
See https://github.com/WordPress/gutenberg/issues/67697
[MAILPOET-6342]
2024-12-09 14:16:04 +01:00
4b761ac74d Cleanup SaveEmailButton to work only with email
[MAILPOET-6342]
2024-12-09 14:16:04 +01:00
2e52419ffd Add save all button and logic for displaying it in the header
[MAILPOET-6342]
2024-12-09 14:16:04 +01:00
5b443027bf Rename SaveButton to SaveEmailButton
This component will be used for saving changes only in email content.
It is a link variant button and will still be present next to Save/Send button.
[MAILPOET-6342]
2024-12-09 14:16:04 +01:00
fbf4272e0e Update email editor acceptance test
MAILPOET-6331
2024-12-09 10:30:42 +01:00
8b1f7c9a88 Fix lint style errors
MAILPOET-6331
2024-12-09 10:30:42 +01:00
2896ed45eb Add text information for recent category templates
MAILPOET-6331
2024-12-09 10:30:42 +01:00
cec952fbde Add help icon to recent button
MAILPOET-6331
2024-12-09 10:30:42 +01:00
cb091e0dc6 Add support for basic tab navigation when selecting template
MAILPOET-6331
2024-12-09 10:30:42 +01:00
5743ccbc5f Separate SelectTemplateModal into smaller components
MAILPOET-6331
2024-12-09 10:30:42 +01:00