MessageTemplate - Graduate new editing UI
Re: @eileen's comment on https://github.com/civicrm/civicrm-core/pull/24981#issuecomment-1753901505
as an aside - I was thinking about the fact there are 2 parts to the message admin - this search display & the edit form (well those are the major parts).
I feel like the edit form is mature enough to remove the quick form one - but where would it sit?
My first impulse was skeptical, but now I kinda see it. Let me try to talk it through:
- When we implemented the new editor (for translatable system-workflow messages), we put it in an extension (
message_admin
) for fear that it wouldn't be at par with the existing editor. - The "Message Templates" are two things -- "user-defined templates" and "system-workflow messages". The suitability depends on how strongly you make that distinction.
- The attitude can be: "They're both
MessageTemplate
, so they're the same thing, so they should use the same editor" ... In that case, no, the currentmessage_admin
editor is not ready to handle "user-defined templates". - The attitude can be "They're really different things, and we should split them apart" .... In that case, yes, I think we could basically elevate the
message_admin
editor-screen for system-workflow messages on all sites.- In brainstorming with Coleman for #4454, I quite liked the idea of providing separate nav-links for those screens. (Add a separate link for "Admin > Communications > Workflow Messages".)
There are a few differences between the screens:
- Editing widget
- The old editor uses the
ckeditor
widget. User-defined templates lean more on prose and layout. Using a rich-text widget is more agreeable. - The new editor uses the
monaco
widget. Workflow-message templates lean more on logic and data. Using a structured widget is more agreeable.
- The old editor uses the
- Missing options
- The old editor has some "PDF" options
- The old editor has an option to upload a document (instead of editing in browser).
- Extra options
- There are various options+buttons that appear in the new workflow-message editor -- but haven't been thought-through for the user-defined stuff - e.g. "Original", "Draft", "Locale", "Activate"
IMHO, this would be the shortest path to elevating/blessing the new editor for all sites:
- Conceptually, accept "User-defined templates" and "System-workflow messages" as different things (with different screens).
- Setup separate links/titles for the pages
- Examine (and possibly port) the missing options (esp PDF dropdown).
- Move the editor to core.