Commit Graph

226 Commits

Author SHA1 Message Date
69d1714487 Adjust Gutenberg component usage to minimize warnings in console
[MAILPOET-6379]
2025-01-06 12:22:56 +01:00
29254bc962 Use PersonalizationTagsPopover for editing in blocks and details panel
[MAILPOET-6379]
2025-01-06 12:22:56 +01:00
aa2987352e Add a new popover component for editing Personalization Tags
[MAILPOET-6379]
2025-01-06 12:22:56 +01:00
a2b75a73f3 Add support for the stable border feature name
[MAILPOET-6359]
2025-01-06 08:52:49 +01:00
5fb8247163 Fix duplicate templates in select modal
[MAILPOET-6334]
2024-12-31 14:09:12 +01:00
09747dd98a Update start from scratch and close to use the first template + pattern
[MAILPOET-6334]
2024-12-31 14:09:12 +01:00
a617062e72 Update names of template + pattern combinations in select modal
[MAILPOET-6334]
2024-12-31 14:09:12 +01:00
e97869e6eb Show combination of templates and all patterns in select template modal
[MAILPOET-6334]
2024-12-31 14:09:12 +01:00
106d22448f Hide blank email-general template from the template selection
[MAILPOET-6334]
2024-12-31 14:09:12 +01:00
a5db2564c8 Add post_types field to the template REST API response
We want to use post_type for filtering email templates.
There is a PR that adds this property https://github.com/WordPress/wordpress-develop/pull/7530
but it is not merged.
This commit added the property and also future compatibility check
so that we don't attempt to add it after the PR is merged.
[MAILPOET-6356]
2024-12-20 15:14:30 +01:00
2fc0ad3c9e Switch template registration to use register_block_template
[MAILPOET-6356]
2024-12-20 15:14:30 +01:00
62b77b724c Change callback and function names
[MAILPOET-6376]
2024-12-20 10:12:04 +01:00
e56fe9a95e Add support for replacing written Personalization Tags with attributes
[MAILPOET-6376]
2024-12-20 10:12:04 +01:00
0e13133499 Use valueToInsert in Personalization Tag modal
[MAILPOET-6376]
2024-12-20 10:12:04 +01:00
6fbaebcc09 Add replacing Personalization Tags for subject and preheader
[MAILPOET-6376]
2024-12-20 10:12:04 +01:00
041d76830b Add filter replacing written Personalization Tags to email editor
[MAILPOET-6376]
2024-12-20 10:12:04 +01:00
891bc34efa Fix switching to template mode
When we switch to template mode RichTextButton, which is dependent
on mailpoetData fails to render. The panel is hidden but it is hidden
in a subsequent render so we need to add check if mailpoet data are available.
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
635ba35a52 Add small comment and performance improvements
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
0b44ccdb4a Use @ts-expect-error instead of @ts-ignore
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
9edd4a6096 Add link into modal header
I unified the link with the link in details panel.
The target link should be replaced later in a different task.
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
cece3711f8 Use useCallback for insert functions
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
bc1581b174 Change rich-text-utils filename extension
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
2aae43b91e Create new richText component with button
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
b264c74ce9 Refactor modal to pass insert callback and isOpened value
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
64264460e8 Refactor initial fetch tags into resolver
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
cc38100109 Move common functions into utils file
[MAILPOET-6354]
2024-12-18 14:15:05 +01:00
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