* Fix site logo align right in group
Alignment broken when Site Logo is inside Group in the email editor
* Add changelog
* Fix linting issue
* Improve code
Fixes a bug where the linear gradient overlay on tables would not disappear when resizing the viewport back to a larger size. The issue was affecting tables in the WooPayments plugin.
* Add parameter post_type to the selector getEditedPostTemplate
Loading templates without the post_type parameter caused failing initialization in the MailPoet plugin.
* Add changelog
* Add middleware allowing strip post status on save
This can cause an issue in MailPoet when click on save publishes the email post.
* Refine logic for displaying publish button in email editor
Adjust conditions to ensure proper handling of template edits, post entity changes, and draft states.
* Add changelog about the new middleware
* Refactor strip-post-status-on-save middleware by CoreRabbitAI
* Remove strip-post-status-on-save middleware and related logic.
* Export `storeName` to enable external access to the email editor's data store identifier.
* Remove redundant changelog
* Create Assets Manager class
The new class should handle assets that needs to be enqueued.
WOOPLUG-5177
* Add method for loading email editor assets
WOOPLUG-5177
* Add preloading rest API data to Assets_Manager
WOOPLUG-5177
* Use Assets_Manager in Email Editor PageRenderer
WOOPLUG-5177
* Update readme in email editor
WOOPLUG-5177
* Add changelog for email-editor package
WOOPLUG-5177
* Fix Assets_Manager for using in 3rd party integration
WOOPLUG-5177
* Refactor email editor HTML rendering into Assets_Manager
WOOPLUG-5177
* Integrate `Email_Editor_Logger` into `Assets_Manager` and improve error logging for missing asset files
WOOPLUG-5177
* Refactor Email Editor to clean up unused imports, adjust assets path and URL formatting, and remove redundant data escaping.
* Remove `woocommerce_email_editor_script_localization_data` filter in Email Editor PageRenderer.
* Provide account reset and test account disable URLs from the backend
* Update onboarding types
* refac: Provider Activate Payments button to use BE-provided URL to disable test account
* refac: Business verification step to use BE-provided URL to disable test account
* refac: Context menu reset account to use BE-provided reset URL
* refac: Test account error notice to use BE-provided reset URL
* Remove reset account and disable test account utils
* Add changelog
* test: Update WooPayments provider tests
* Lint fix
* Update tag filter selector to handle undefined postTypes
WOOPLUG-5234
* Fix useIsEmailEditor hook
It was not working correctly for template-only mode.
When currentPostMatch is true, we are for sure in the email editor.
---------
Co-authored-by: Rostislav Wolny <rosta.wolny@automattic.com>
* Email editor: Suppress HTML5 warnings during conversion.
* Add changefile(s) from automation for the following project(s): packages/php/email-editor
---------
Co-authored-by: github-actions <github-actions@github.com>
* Export Email Editor component for usage in a react app
* Update EmailEditor to accept postId, postType and isPreview
* Add a hook to detect email editor is active
* Pass email editor post id and type via props
* Speed up editor initialization
* Restore the older, more stable initializeEditor function in Woo core integration
* Rename the exported email editor component to experimental
WOOPLUG-4755
* Add changelog
* Fix linter warnings
* Incorporate code rabbit remarks
* Add support for filtering personalization tags by post type
WOOPLUG-5118
* Add client site filtering personalization tags by post type
WOOPLUG-5118
* Set post_types for registered personalization tags
WOOPLUG-5118
* Remove post type filtering for personalization tags from API
WOOPLUG-5118
* Fix client filtering tags for template post
WOOPLUG-5118
* Update personalization tags documentation
WOOPLUG-5118
* Add '@wordpress/dom-ready' to the email-editor package dependencies.
* Enhance email editor block support by adding a function to remove block styles from all blocks.
This is done to ensure compatibility with email rendering by excluding unsupported styles.
* Refactor email editor block functionality by enhancing column layout handling and removing unused button and column block enhancements.
Why: This is done to consolidate functionality and remove duplicates.
The `disableColumnsLayout` function has been updated to `disableColumnsLayoutAndEnhanceColumnsBlock` for clarity, and the button block enhancement has been removed to streamline the codebase.
* Add changelog file
* Disable duotone support from the email editor core.
* Update email template to use site logo block instead of static image for improved flexibility
* Enable site logo and site title blocks for use in the email editor
* Add changelog file
* Remove default underline from site title link in email editor styles
This is mainly to maintain style consistency between the email editor and the rendered output
* Refactor email template to dynamically include site logo or title
Updated the WooEmailTemplate class to replace the static site logo with a dynamic method that checks for the presence of a custom logo. This enhances flexibility in email templates by allowing the display of either the site logo or title based on availability.
* Add Woo plugin changelog file
* Apply quick PR review feedback
* Ensure we fetch image size with the correct parameter.
This fixes the warnings: Failed to open stream: Connection refused in ...
* Ensure Site Title and Site Logo blocks renders correctly
* Code style lint fixes
* Enhance Site Logo block by adding a custom variation for the email editor. This includes registering a default centered alignment and width for improved presentation.
* Add JS package changelog file
* Add new post_types property to Abstract_pattern
WOOPLUG-5180
* Add filtering for email patterns by post type
WOOPLUG-5180
* Set post_types property to WooEmailContentPattern class
WOOPLUG-5180
* Replace using editor.preSavePost with middleware
Using editor.preSavePost does not work correctly when the user edits template and post.
* Add changelog
* Improve removing a redundant error message to match translated text
* Implement coderabbitai notes
* Refactor validation middleware and introduce a new hook
* # This is a combination of 5 commits.
# This is the 1st commit message:
Email Editor: Integrate the convert class from the HTML to Text library and remove the dependency.
# This is the commit message #2:
Fix linting errors.
# This is the commit message #3:
Fix more linting errors.
# This is the commit message #4:
Fix package linting errors.
# This is the commit message #5:
Fix additional package linting errors.
* Email Editor: Integrate HTML to Text library and remove external dependency
- Internalized soundasleep/html2text functionality
- Added Html2Text and Html2Text_Exception classes
- Updated composer.json to remove dependency
- Fixed all PHPStan and WordPress coding standards violations
- Ensured PHP 7.4+ compatibility and standalone package support
* Fix potential security issues with exceptions.
* Ignore error_logs since they're for security purposes.
* Remove unused .
* Email editor: Add unit and integration tests for html2text, and remove unnecessary import.
* Fix PHP and linter issues.
* Attempt to keep the tests happy while fixing the PHPStan error.
* Change from double quotes to single quotes.
* Add changefile(s) from automation for the following project(s): packages/php/email-editor
* Add security information to package
* Add copyright and license headers to new files
* Add package license
- GPLv2 or later
- Also incorporates work with different copyright and license.
Internal reference:
p2y3YZ-9Ry-p2#comment-22676
* Add new licensing / security reporting policy
* Add 2 new files to mirror repo as well
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>
* Add a new in progress field to tasks and default to false
* Expose payments as in progress for now
* Display in progress if the task matches that state
* Add styling to match the in progress state
* Add in progress to types
* Use isInProgress in the task element
* Add linear gradient to match design for in progress task
* Move in progress div to the correct node tree
* Add necessary styling for the in progress badge
* Marke the payments step in progress if a test account is present
* Add changefile(s) from automation for the following project(s): @woocommerce/experimental, @woocommerce/data, woocommerce, woocommerce/client/admin
* Add in progress label
* Pass in progress label
* Change the in progress label for Payments task
* Update styling to match the in progress badge design
* Change direction of CSS gradient
* Add check for is_complete()
* Add changefile(s) from automation for the following project(s): @woocommerce/experimental, @woocommerce/data, woocommerce, woocommerce/client/admin
* Trigger stuck CI
* Fix return value to be string
* Fix CI/Linting
* Remove inProgress for things to do next
* Update changelog copy
* use esc_html__
* Check for label before rendering
---------
Co-authored-by: github-actions <github-actions@github.com>
Safely merge theme and default colors. This update ensures that undefined color palettes do not cause errors by using null coalescing for array access.
* Move button styling from Core/Theme.json to Engine/Theme.json
The Core/Theme.json has higher priority than the Engine/Theme.json. This affects styles set by the user and prevents them from working.
* Fix global styles preview panel throwing errors for classic themes
* Add Site Style Sync Controller to Email Editor
Integrate the Site Style Sync Controller into the Email Editor Container and Theme Controller. This allows for the merging of synced styles from the current active theme, enhancing the theme management capabilities.
* Add Site Style Sync Controller for Email Templates
Introduce the Site Style Sync Controller to manage the synchronization of site styles with email templates. This implementation ensures visual consistency by converting site theme styles into email-compatible formats, enhancing the email editor's functionality.
* Add utility methods for CSS value conversion in Styles Helper
Enhance the Styles Helper class by adding methods to convert CSS values to static pixel values, remove CSS units, and handle clamp() values. This improves compatibility for email clients and provides better styling options for email templates. Additionally, update unit tests to validate the new functionality.
* Remove unnecessary items from the Site Style Sync Controller and reuse the Styles_Helper
* Add tests for the Site Style Sync Controller class and update Theme_Controller_Test to account for site theme sync
* Update documentation
* Enhance color palette handling in Preview component to ensure default colors are safely concatenated with theme colors, preventing potential errors when default colors are undefined.
* Add changelog files
* Apply PR review suggestion
* Update convert_to_px method to use a different base font size when provided
* Add email-safe font handling to Site Style Sync Controller
Why: to ensure a WYSIWYG experience between the email editor and the rendered output.
Introduce functionality to retrieve and convert font families to email-safe alternatives. This includes a new method to fetch email-safe fonts from theme.json and updates to typography style conversion to ensure compatibility with email clients. Additionally, comprehensive tests have been added to validate the new font handling features.
Fix analytics crashes with gutenberg 21.2 (#59846)
* Fix issue with passing an undefined value to sprintf for item labels.
* Correctly handle sprintf label when label is undefined
* Add changelog
* Make sure that if noResults is undefined we still pass an empty string.
* Update changelog
Co-authored-by: louwie17 <lourensschep@gmail.com>
* Fix the params passed to the wrapped post content edit
The updated original Edit expects to get more parameters
and throwing an error during destructuring the params
With this change, we always pass all the params.
WOOPLUG-5086
* Add changelog
* Add documentation for block registration in the WooCommerce Email Editor
* Introduce a new guide on registering WordPress blocks for email rendering, covering configuration, rendering callbacks, and best practices.
* Update README to include a link to the new block registration documentation.
* Add changelog file
* Fix lint errors
* Update block registration documentation to include support for `supports.email` in block.json and JS registration. Clarify the use of `block_type_metadata_settings` filter as an alternative method.
* Fix spaces in building-and-publishing.md
The validate markdown job was failing due to invalid cound of spaces for unordered lists.
---------
Co-authored-by: Jan Lysý <jan.lysy@automattic.com>
* Log warning when imported option value is overridden by hooks during Blueprint import
* Avoid logging sensitive data, switch from add_info to add_warn for clarity
* Update the test
* Add unit test to assert warning when option value is overridden by a hook
* Add changefile(s) from automation for the following project(s): packages/php/blueprint
---------
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
Personalization tags were being stripped from the text version of emails
during HTML-to-text conversion. This prevented them from being replaced
with actual values later in the email sending process.
* Update settings URL for offline payment methods
* Add removeOriginFromURL function to help with navigation
* For offline payment methods, navigate to the URL instead of using href
* Navigate instead of changing location href
* Update the offline placeholder to include a header to avoid sudden changes in the UI
* Update links to the new format
* Update BACS component to use a header
* Add a header to the offline payment methods page
* Add a header to the BACS PM
* Add necessary header styles
* Remove unnecessary margin forcing
* Add cheque payments header
* Add COD header
* Add header to the loading state to avoid sudden UI changes
* Move SettingsPaymentsMainWrapper to after components definitions and declare new routes
* reduce code duplication by removing the header out of suspense and the component
* reduce code duplication by removing the header out of suspense and the component
* reduce code duplication by moving the header out for COD
* reduce duplication by moving the header out of the cheque component
* Fix typo in check payments
* Fix styling issues by wrapping the components in a div
* Update comment
* add redirection for old paths
* First try to fix lint issues
* Add a comma after the last argument
* Fix tests after changing the URLs
* Add changefile(s) from automation for the following project(s): @woocommerce/data, woocommerce, woocommerce/client/admin
* Default to url if we can not run a replace
* reduce code duplication by using a central component
* Remove the Header as it's not used anymore
* Fix components layouts
* Wrap SettingsPaymentsMain test file in Router
* Add margins for offline settings
* Remove non used Take offline payments header
* remove unit from CSS
* remove border bottom from header layout
* add margins for offline container to match the settings container
* Get back to the checkout tab in settings in order to remove the path query arg
* clear store when navigating back to offline PMs list
* Add get_settings_url for cod, cheque, and bacs
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Oleksandr Aratovskyi <79862886+oaratovskyi@users.noreply.github.com>
Co-authored-by: Vlad Olaru <vlad.olaru@automattic.com>
* Refactor dependency registration in Email_Editor_Container to use the email editor container instead of the Blocks registry container.
This ensures the container is available when the email editor package is exported and released as a library.
Additionally, update Email_Editor_Integration_Test_Case to utilize the new container structure, streamlining the initialization of dependencies for tests.
* Add change log file
* Fix phpstan errors and revert Email_Editor_Integration_Test_Case update
* Add the mirror PHP package workflow and cleanup script
WOOPLUG-3249
* Rename JS config package for email editor PHP package
This is to align with the naming in the JS package.
WOOPLUG-3249
* Add changelog
WOOPLUG-3249
* Update readme.md in the editor PHP package
WOOPLUG-3249
* Update email editor package and tooling to support packages-prepare workflow
WOOPLUG-3249
* Add build:composer-package script
WOOPLUG-3249
* Update the PHP package mirror workflow to use prepared commands
WOOPLUG-3249
* Add an extra readme.md for the mirrored repository
WOOPLUG-3249
* Remove the unused mirror cleanup script
WOOPLUG-3249
* Add tyhehints to Formatter::getReleaseLink
WOOPLUG-3249
* Use the package name from composer.json for creating the release link
WOOPLUG-3249
* Merge the build path export to the build package step of the PHP package mirror workflow
WOOPLUG-3249
* Review: fix package prepare for initial release.
* Review: package build tweaks.
* Review: workflow tweaks.
* Review: cleanup.
---------
Co-authored-by: Vladimir Reznichenko <kalessil@gmail.com>