-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Removing the legacy builder #14450
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
Removing the legacy builder #14450
Conversation
3c85b0d
to
384b2c2
Compare
67694a4
to
d22a3a8
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 6.x #14450 +/- ##
==========================================
Coverage 64.07% 64.07%
+ Complexity 34677 34528 -149
==========================================
Files 2287 2265 -22
Lines 103786 103175 -611
==========================================
- Hits 66499 66108 -391
+ Misses 37287 37067 -220
|
Some CSS styles that seem to be related to the legacy builder must be returned back
Co-authored-by: Martin Vooremäe <martin.vooremae@gmail.com>
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 changes look good to me. I’ve tested the PR and found no issues.
When I tried to test this by opening an old email (the test one from sample data) which used the blank theme, I am greeted with a partly blank screen with no builder or editor. I think for these old theme emails we should perhaps be opening them in the GrapesJS builder as an HTML email? Here's a screencast: https://app.screencastify.com/v3/watch/Nmlm5epI7LeAY7zBEDdn The blank theme should support the GrapesJS builder however it seems like it's loading in the old one: |
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.
Sorry forgot to leave as a RQ review!
@RCheesley I cannot reproduce: Screen.Recording.2025-02-05.at.13.42.41.movPlease make sure you've run |
I've run npm ci and regenerated assets (I'm in dev mode, locally) and still getting it opening in the old browser :( Also tried this in Gitpod to rule out funky stuff with my local environment. @escopecz can you please try in Gitpod so we have reproducible environments with the sample data? |
I don't think it's the old browser that's opening. I think it's the GrapesJS builder but having some issue with the content. I'll try to use the sample data as you do when I find a free minute. |
I can reproduce @RCheesley's issue on Gitpod with sample data loaded. JavaScript error appears in the console when opening the Builder: Uncaught Error: No valid HTML template found
at O.getOriginalContentHtml (builder.js?v05d545f1:10:2514)
at tc.initEmailHtml (builder.js?v05d545f1:85:5826)
at tc.initGrapesJS (builder.js?v05d545f1:85:3225)
at Mautic.launchBuilder (builder.js?v05d545f1:85:9673)
at HTMLButtonElement.onclick (1:1:8)
at Object.trigger (jquery.js?v05d545f1:8635:27)
at HTMLButtonElement.<anonymous> (jquery.js?v05d545f1:8707:17)
at Function.each (jquery.js?v05d545f1:383:19)
at jQuery.fn.init.each (jquery.js?v05d545f1:205:17)
at jQuery.fn.init.trigger (jquery.js?v05d545f1:8706:15) Screen.Recording.2025-02-06.004456.mp4Also I tested it on the 6.x branch, encountered the same issue. The builder opens, but still broken and the same error appears in the console. I can't close the builder or save, it's stuck. Screen.Recording.2025-02-06.011009.mp4 |
@RCheesley do you mind merging this and fixing the sample data issue later as it wasn't introduced in this PR? |
@escopecz sure let's raise a separate issue so we don't lose track of it. |
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.
Finally 👍
Seems good.
Works and code diff seems 👍
Flagged up the issue in #14563 to be fixed separately. |
Description
It's time to remove the Legacy builder that funny enough I mostly built. It got replaced by the GrapesJS builder many years ago and only few are still preferring the legacy builder nowadays. It got broken during the latest UI upgrades and not many notice (I saw 1 discussion on the topic) and there was no one who would care to fix it. So it's time to say goodbye and make Mautic a little leaner, simpler and faster.
This is what happens when you disable the GrapesJS plugin and try to use the email or page builder:

Todo:
📋 Steps to test this PR: