-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update grapesjs compatibility (Mautic 5) #49
Update grapesjs compatibility (Mautic 5) #49
Conversation
04c218e
to
4b0c951
Compare
It would be helpful if someone testing this, can put special attention to any JS errors in GrapesJs and if there are any unexpected font differences with the 5.x branch. |
About the changes:
|
…bo/grapesjs-preset-mautic into update-grapesjs-compatibility-m5 + fix merge # Conflicts: # dist/buttons/buttonApply.command.js # dist/buttons/buttons.service.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code updates seem good. But I can't check the mail builder because there's an issue with the 5.x branch: mautic/mautic#13510.
I think the description should maybe say you need a local copy of 5.x rather than 4.x? |
@RCheesley ah, right, sorry. Changed it. |
… traits instead, so it won't try to use a non-existing Node
It looks a bit like the Dynamic Content block is simply not properly rendered (shows the |
@adiux I see that you have worked extensively on the Dynamic content block. I could use a bit of help figuring out why this is broken, all of a sudden:
All I updated for it, was change the use of the legacy API with the new one (as per these release notes) but I don't understand enough about the Dynamic content block to see where/why these issues occur. |
Hi @LordRembo as far as I understand it the DC is stored in the DOM (#dynamicContentContainer) of the editor pages HTML. The decId is used to link it to a DC editor (where you actually edit the DC). The There is a GJS command that transforms the token ({dynamiccontent="Dynamic Content 2"}) to the representation in the UI. Not sure why there is only mj-text, but I would start fixing this error. Hope this helps. Let me know if you have questions. |
@adiux Seems like the 'remove' event is fired whenever the Builder is opened, and that removes the item. That should not be the case I think? You have any idea if this code can be safely removed?
|
@LordRembo just from this snipped, this seems to be needed. Otherwise, how would a DC be removed? Why is it fired on the opening of the builder. That sounds strange to me. |
@adiux Without it, the blocks do get removed in code but it's only an empty reference that is kept in storage. Which I would agree is at least good practice to clean up. |
… ones, but make it readable
…g to hardcode padding, so layout matches the other blocks in the email template
…e output of what will be rendered in the mail itself.
Alright, issues fixed, updated the grapesjs update PR to use the latest changes. Refer to that one for QA. |
Just practically, I think we need a 5.1 branch to merge this thing, because it is used for the GrapesJS upgrade PR and that one is planned for a 5.1 release. |
I created the 5.1 branch |
Alright! The PR that depends on this update, has its required 2 approval reviews. So this preset should be good to merge (against the 5.1 branch). |
Registering your custom components using the legacy method breaks when updating GrapesJS to release 0.20.1. Need this to be able to upgrade GrapesJS in the GrapesJSBuilderBundle.
Here is a PR for Mautic 4
To test:
npm i grapesjs-preset- mautic@github:LordRembo/grapesjs-preset-mautic#update-grapesjs-m5
inside that bundlenpm run build