Commit Graph

131 Commits

Author SHA1 Message Date
Rostislav Wolny
ab00d505b9 Replace logic for detection of editor mode by the useEditorMode hook
[MAILPOET-6336]
2024-12-06 12:21:19 +01:00
Rostislav Wolny
02dabf9c01 Add a custom hook to determine whether we are in email or template mode
There are a couple of places where we determine the mode, but we use different approaches.
This commit adds a mechanism for determining the editor mode which can be easily reusable
in the whole app.
[MAILPOET-6336]
2024-12-06 12:21:19 +01:00
Oluwaseun Olorunsola
cd184c373c Update readme, implement PR feedback
MAILPOET-6256
2024-12-04 14:48:04 +01:00
Oluwaseun Olorunsola
8c2ede4ff9 Update Readme documentation
MAILPOET-6256
2024-12-04 14:48:04 +01:00
Oluwaseun Olorunsola
98bc96b1b8 Add loading state and remove custom button position.
Based on PR feedback https://github.com/mailpoet/mailpoet/pull/5972#issuecomment-2516596159, The Email editor cannot work without a template. So, we currently don't need to set up workflow to support template not loading

MAILPOET-6331
2024-12-04 13:29:00 +01:00
Oluwaseun Olorunsola
abf03d6cc7 Update "Start from scratch" button styles when no template is registered
MAILPOET-6333
2024-12-04 13:29:00 +01:00
Oluwaseun Olorunsola
46c8ae94bc Add "Start from scratch" to the template selector
MAILPOET-6333
2024-12-04 13:29:00 +01:00
Oluwaseun Olorunsola
3386f9f4f1 Fix eslint warnings: Post not found and useSelect has a missing dependency
MAILPOET-6316
2024-11-27 18:02:35 +01:00
Oluwaseun Olorunsola
f9458c2b7f Fix eslint warnings: block and blockinstance
MAILPOET-6316
2024-11-27 18:02:35 +01:00
Rostislav Wolny
324e02f2cf Remove redundant lock_unlock.js
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Rostislav Wolny
b1c8f2cc0e Remove double import of block editor private apis
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Rostislav Wolny
8d1d32a213 Add very simple readme for private APIs
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Rostislav Wolny
7ad7e45d07 Remove root unlock from email editor
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Rostislav Wolny
0431e5eb25 Consume useGlobalStylesOutputWithConfig from private-apis
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Rostislav Wolny
b631e509ef Export StylesColorPanel from private-apis file
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Rostislav Wolny
ceecfe69a5 Move unlocking core store and block editor store to private apis
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Rostislav Wolny
d8a3289414 Remove unnecessary unlock of editor settings
The selector is public.
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Rostislav Wolny
cac56f3563 Move Tabs to private and document usage
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Rostislav Wolny
fbdfc61eaa Move BlockCanvas to private APIs
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Rostislav Wolny
c72b0b6f79 Get rid of useFlashEditableBlocks
It is a private API which is not critical for our application.
It shortly highlights blocks that are editable after a click in the parent.
As it is not critical and is private, it is a risk, and we should rather not use it.
[MAILPOET-6319]
2024-11-26 16:44:11 +01:00
Oluwaseun Olorunsola
13bf305aeb Update filter name and add reason for ts-ignore
MAILPOET-6315
2024-11-26 13:50:53 +01:00
Oluwaseun Olorunsola
b9b503889d Add NpsPoll feature support for Email editor
MAILPOET-6315
2024-11-26 13:50:53 +01:00
Oluwaseun Olorunsola
87676ccdb6 Add base route for sending preview email
MAILPOET-6092
2024-11-18 15:28:31 +01:00
Rostislav Wolny
33e828f2ed Remove the custom editor page
[MAILPOET-6090]
2024-11-15 17:16:21 +02:00
Rostislav Wolny
c71949e326 Render custom editor for mailpoet_email post types
[MAILPOET-6090]
2024-11-15 17:16:21 +02:00
Rostislav Wolny
da5e90a429 Refactor .scss files import to one place
This approach is used in the Gutenberg repository.
Our original approach, where we imported styles in index files in subdirectories, was a bit fragile
because such a file might be skipped in case a component is imported directly.

[MAILPOET-6320]
2024-11-14 17:28:53 +02:00
Oluwaseun Olorunsola
f945ea8388 Use @wordpress/editor store with email editor components
MAILPOET-6303
2024-11-12 15:41:23 +01:00
Oluwaseun Olorunsola
e37997e2e1 Move ListviewSidebar state from email editor store to @wordpress/editor store
MAILPOET-6303
2024-11-12 15:41:23 +01:00
Oluwaseun Olorunsola
ef009d0400 Move InserterSidebar state from email editor store to @wordpress/editor store
MAILPOET-6303
2024-11-12 15:41:23 +01:00
Oluwaseun Olorunsola
1c3ea9cd0a Move email editor components out of the engine folder
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
e6d607028c Move powered by mailpoet block back to the main mailpoet assets folder
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
716ba4ebc3 Fix typescript and type check errors
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
8c604453b1 Run email editor through Prettier
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
3402ae74da Add Prettier support for WP coding style
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
8c8bd728a7 Update git blame commit hash
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
ef4cf077ba Ensure linting is done for email editor JS and CSS files
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
820cbd2939 Fix wp-scripts lint errors
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
b2fb96f879 Switch email editor js package to WP coding style
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
462434af5d Fix email editor css link
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
fed306490a Fix webpack build and compile
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
e8180fcbc5 Convert named alias to relative paths.
This seems to be having an issue with the current webpack config and the babel loader. We will fix the issue on another ticket

MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
632c381b73 Add basic email editor build config
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
912282f57c Move all items to src folder
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Oluwaseun Olorunsola
466b9c1235 Move email editor to JS packages folder
MAILPOET-6215
2024-11-11 11:53:49 +02:00
Rostislav Wolny
a3514377c8 Move default props to default parameters - simple cases
React throws a deprecation warning for defaultProps.
This commit refactors default props to default values in easy-to-fix cases.

[MAILPOET-6108]
2024-06-21 16:36:06 +02:00
Jan Jakes
4d2ec58b8e Add eslint-plugin-check-file configuration
[MAILPOET-4938]
2023-10-02 13:05:20 +02:00
Jan Jakes
62dcee8ae9 Merge newsletter tests config into ES5 config
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
Jan Jakes
8d311f2d9f Rexpose globals for usage in config overrides
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
Jan Jakes
263e8f6f4d Remove redundant rule exception (same value as from parent configs)
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00
Jan Jakes
ccbd239009 Remove premium-specific TS config, move free-specific rules to its config
[MAILPOET-5015]
2023-03-27 15:24:38 +02:00