-
Notifications
You must be signed in to change notification settings - Fork 50
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
Bojan's thouhgts on how to improve Message #164
Comments
We have some projects in Gizra which uses the Message module a lot - for emails and logs. And as the project growing the Message module get more "abused" and this is something we need to solve widely. Not just for Commerce Kickstart. I would like to suggest plugins as our friend for your problems:
I think, in this case we can make a plugin which will render the message text(email title and body) using twig files. You said back then that you need a way to pass values easily to the twig template and in this case, our plugin will have a method that will inject the values to the twig template thus removing the need for tokens.
I think plugins is the answer in here as well. But in this case you could create a message type which relies on small plugins(YML or annotation based). From the UI we can order the text of the message by drag and drop in a similar way to how we create view mode. |
Extensibility is a fine goal to have, but the question here is more about what the default UX and DX should be for the main Message use cases. |
@jhedstrom Is a heavy contributor. Any thoughts? |
I've been thinking this over, I still don't have clear thoughts on all described above, but I do think cleaning some or all of this up for a I particularly like the idea of partials with machine names, as well as twig templating. I would want to retain some ability to use a WYSIWYG for editing though, as many of these are used for emails that folks want highly styled (and don't want to have to wait on a dev or themer for changes, etc). I don't want to change it up this much in the |
Well... it's clearly something special to get an email from @bojanz the great but I'll share the email:
The text was updated successfully, but these errors were encountered: