Commit Graph

21439 Commits

Author SHA1 Message Date
2858a21783 Add spacing sizes presets
This commit addresses an issue that padding control in the email
an editor is rendered without a slider.
This change makes the padding control render the same as in TT4 theme
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
0298f48dae Fix lint issue after rebase
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
74d217ea62 Remove @types/wordpress__components package
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
de7400e474 Use conditional types for fixing button type
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
4882a1c66f Remove unnecessary array spread in webpack config for email editor
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
bbc4a86759 Rename flag for skipping tests in webpack build
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
ef99b96b66 Fix padding in automation editor name edit popup
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
c929f49761 Fix support of WP admin colors schemes for all plugin pages
When checking pages after updating dependencies, I noticed that some buttons have strange colors.
For example, buttons on the "What would you like to create?" page for new newsletters.

I found that this was related to a change in wordpress/components styles.
The original colors were identical to the default WordPress admin color scheme,
so the buttons were ok when an admin used the default scheme, and in case they use a different scheme
the buttons still look like default (blue).
But after the update, all components on MailPoet pages that don't load WP color admin variables
had a strange purple color.

This commit fixes it by including CSS for admin color schemes into mailpoet-plugin.css which is loaded on every MailPoet admin page.

Note the mixin wordpress-admin-schemes() is included in many build styles for other wordpress packages (e.g. wordpress/block-editor)
so admin color schemes worked correctly on some MailPoet pages even before this change.
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
7acdbf7fc3 Fix error for Tooltip text using ReactNode
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
8ef77dbe58 Add support for skipping build of JS tests and skip when building zip
This commit addresses issue with insufficient resources on Circle CI
to avoid using larger executor instances.
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
ee07cb1208 Disable TsCheckerPlugin for email editor production build
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
31e31e3f30 Remove unnecessary types overrides for Wordpress/components
I believe these are no longer in use because wordpress/components
come with built types.
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
d33de5f51c Update acceptance tests
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
0a0a0d404a Update browserify-sign dependency
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
e74bd44319 Update wordpress/* dev dependencies also to wp-6.4
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
795279b637 Opt-in to no margin for FontSizePicker
The bottom margin will be deprecated. With __nextHasNoMarginBottom
switched to the future styles without the margin.
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
d1a88b902f Remove unnecessary wrapper for toggle sidebar panel in form editor
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
aa74dfc0e4 Fix eslint issues
The issues were related to a change in Gutenberg where ActionCreators are not promisified.
See https://github.com/WordPress/gutenberg/pull/52530
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
83f221b80b Fix TS issues with props in automation TemplateDetail component
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
adbbab6b61 Fix incorrect indentation of the admin panel in automations editor
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
ad318563df Fix document actions appearance in automations editor
The dropdown component used for setting the automation name is based
on the document actions component from edit-site package. After the update,
the appearance changed significantly, and it was broken.
This commit adds CSS to restore the original look as before the update.
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
8431ec33e1 Fix the rest of TS errors in automations codebase
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
cb7ae2a442 Fix value in Dropdown focusOnMount prop
The currently supported values are 'firstElement' | boolean
Based on the JS doc and my testing, we need to use true
to hide the popup on click elsewhere or by ESC.
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
b9475c43b8 Update the type of the button with extended props used in automation
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
ca22a7f37b Fix buttons prop types issues in automation
[MAILPOPET-5714]
2024-02-19 11:44:33 +01:00
c143da4ccf Fix error JSX element type ConfirmDialog does not have any construct or call signatures
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
daf6618941 Remove unnecessary fix for missing Popover props
The new type has the props.
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
99aaec7f98 Remove passing setIsBusy to dropdown control in OptionButton
Overriding onClick: (setIsBusy?: Dispatch<SetStateAction<boolean>>) => void;
was causing TS errors when passing controls with the type ControlWithSetIsBusy to DropdownMenu.

The OptionButton that uses isBusy logic is used only in the Hero section at automation
Homepage. The setIsBusy function that was passed to control's onClick was not used.

In all other cases where we were passing controls to DrowdownMenu, we didn't set any isBusy state.
So I think it is safe to remove it.
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
5529816a30 Workaround TS error about missing variant prop on MenuItem component
[MAILOPET-5714]
2024-02-19 11:44:33 +01:00
1b4bf9f2dd Make useDispatch hook type in settings store compatible with wp/data
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
0c9b105cd0 Fix ToolbarItem component typescript errors
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
4f1ddc3630 Fix TS errors in assets/js/src/common
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
4d1cacd89b Update Button component props type in MailPoet automation integration
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
c5236e59fc Fix SearchControl error in Segments Template Selection
The search functionality hasn't been implemented yet. The task is currently in backlog.
The control was added in an initial task but is hidden.
I decided to keep it so that I don't remove the translation and just add a dummy
onChange callback to prevent TS error.
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
e24059959e Remove unnecessary Popover.Slot
It is not longer needed see: https://github.com/WordPress/gutenberg/pull/53889
It was causing TS errors
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
349c17ef1d Fix remaining Typescript warnings in form-editor
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
6224f49842 Fix types for SelectControl Options
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
8a34588bbe Use proper types for Color and FontSize
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
4d5705243f Remove custom type definitions that were added in packages
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
8069ba320c Fix types for Notices
There is a mismatch between the WPNotice type and the WordPress/notice store
and Notice defined in the components package.

[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
027e234b64 Remove unused WordPress module declarations
These were needed for the types for stores used in the email editor
when it was based on the post editor. We switched to the custom editor
so we can remove those.
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
5754f2be68 Update deprecated Button props
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
666b0ff9e6 Refactor multiple useSelect calls into one in BasicSettingsPanel
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
2d42b7945c Fix 'useSelect' issue causing multiple renders of basic settings
This commit fixes a warning:
"The 'useSelect' hook returns different values when called with the same state and parameters. This can lead to unnecessary rerenders."
The warning was coming from the BasicSettingsPanel component and was caused
by getAllAvailablePages selector, which returned a new array every time.

[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
37cd1b01f8 Fix types issues in font selection format
The new version of @wordpress/rich-text comes with build types,
but the RichTextFormat is missing attribute values.
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
2acd815127 Update @types/wordpress_xxx packages
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
dee0823098 Remove @types/wordpress__ for packages that have build-types
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
f12be521cc Update WordPress packages to tag wp-6.4
This commit sets all wordpress/* packages we list in package.json
to use tag wp-6.4, which should install the version used in WordPress 6.4
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
1338554c41 Change property name to better fit to new classname
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
dc96fa2b1c Add postprocessor for replacing mark tag to span
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00