mautic icon indicating copy to clipboard operation
mautic copied to clipboard

Update grapesjs to version 0.21.8 (Mautic 4)

Open LordRembo opened this issue 1 year ago • 0 comments

Q A
Bug fix? (use the a.b branch) [ ]
New feature/enhancement? (use the a.x branch) [ x]
Deprecations? [ ]
BC breaks? (use the c.x branch) [ ]
Automated tests included? [ ]
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes #...

Description:

There is an equivalent for use in Mautic 5 (which uses CKE5)

This updates GrapesJs to the latest version (at time of writing) as well as its dependencies. It also updates Parcel (the build tool) to v.2 (v1 is no longer supported) Because it relies on an update of grapesjs-preset-mautic, and that hasn't been merged yet (see this PR), I loaded my forked branch. But that shouldn't stop anyone from testing.

Some changes of note:

  • I added a rebuild and rebuild-dev npm commands because a normal build doesn't actually override the previous files in the dist folder because Parcel has cache files. This essentially does a force clear before building. I found these handy to have while developing.
  • The sidebar icons in the Editor are now SVG instead of an icon font, they look slightly different and scale differently. I've set a max size to come close to the previous styling.
  • The colors are a bit darker/brighter but more uniform. The theming of the newsletter and page presets works a bit differently now (no loose css files). Overall, the styling is now more uniform across the various Editors: mjml newsletter, html newsletter and Page. I have overwritten the hardcoded styles a bit to get the green hover color back instead of red.
  • The Page Editor sidebar layout changed as some blocks got rearranged and regrouped, so I moved some things around to look more like the previous layout. Works better for existing users, I think.

Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Make or edit a new Email: check one written in MJML and one written in html (eg. Paprika and Blank themes)
  3. Make or edit a new Landing Page
  4. You should still be able to drag&drop Sections and Blocks, the Styles should still work as expected and you can still use the ckeditor to change text
  5. Styles don't get lost when opening/closing the Editor
  6. Mails/Pages can still be saved and keep their changes when refreshing the page and reopening

LordRembo avatar Jan 30 '24 10:01 LordRembo