Skip to content
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

[5.3] Add Mail Template Styles #44974

Open
wants to merge 9 commits into
base: 5.3-dev
Choose a base branch
from

Conversation

webgras
Copy link
Contributor

@webgras webgras commented Feb 22, 2025

Pull Request for Issue #44968 .

Summary of Changes

Added fields to the E-Mail Template Options to configure colors and fonts for the emails.
The colors were hardcoded colors to the mailtemplate. Now you can configure them in the backend.

Testing Instructions

Go to System - Mail Templates and click "Options"
Change the Mail format to "HTML" or "Both"
Below the Logo file field you can configure now the font-family for the emails and the colors for background, text and links.

Actual result BEFORE applying this Pull Request

You could not configure the emails.

Expected result AFTER applying this Pull Request

In the fields you can add colors for you email templates
The default values are the same values as coded to the email template before.
grafik

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-5.3-dev labels Feb 22, 2025
@webgras
Copy link
Contributor Author

webgras commented Feb 22, 2025

I will add documentation later

@@ -136,6 +136,18 @@ COM_CONFIG_FIELD_MAIL_SMTP_USERNAME_LABEL="SMTP Username"
COM_CONFIG_FIELD_MAILTEMPLATE_LAYOUT_LABEL="Layout"
COM_CONFIG_FIELD_MAILTEMPLATE_LAYOUT_OFF_LABEL="Mail Template Layout"
COM_CONFIG_FIELD_MAILTEMPLATE_LOGOFILE_LABEL="Logo File"
COM_CONFIG_FIELD_MAILTEMPLATE_BACKGROUND_COLOR="Mail Background Color"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colour!!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hint. Sure. I will change that.

@brianteeman
Copy link
Contributor

I thought 5,3 was in feature freeze now https://developer.joomla.org/news/959-joomla-5-3-0-beta-1-feature-freeze.html

@softforge
Copy link
Contributor

I thought 5,3 was in feature freeze now https://developer.joomla.org/news/959-joomla-5-3-0-beta-1-feature-freeze.html

It is, can be moved to 6.0

@QuyTon QuyTon added the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Feb 22, 2025
@webgras webgras changed the title [5.3] Add Mail Template Styles [6.0] Add Mail Template Styles Feb 24, 2025
@webgras webgras changed the title [6.0] Add Mail Template Styles [5.3] Add Mail Template Styles Feb 24, 2025
@bembelimen
Copy link
Contributor

Hello,
to be honest, I don't think that we should add more parameters to the configuration for something which can be easily solved via an override. Especially as the way we're looking into is to get rid of parameters in the future. So adding more should be very thought through.
Beside that we now have a hard dependency from a layout to a component, which we in general should avoid.

Also it opens a door we should not go through: when we have colours and font family as parameter, why not the padding, too (in best case for each segment individual)? Why not the sizing? Etc. There are so many combination which could be configurable but are not paid attention to, you still have to do an override to adjust them. (which you should anyways).

@webgras
Copy link
Contributor Author

webgras commented Mar 1, 2025

But then we need to remove the dark blue in the heading and in the footer. Because for most of the client websites, the colour just does not fit. And now I need to create overrides for all clients, because clients started to complain.
Another reason why I created this was that in outlook the background colour did not work. so the email background was all white. But that is solved with #44985 already.

We discussed this at the PBF to just add one colour field for the footer. But then we realised that the colour is used for the H1 as well. And when you change the background colour, you need to change the font colour too.
That is why we ended up with all the fields.

What would be your suggestions for changing the blue?
I think you should be able to adjust the brand colour here, without override

@bembelimen
Copy link
Contributor

bembelimen commented Mar 1, 2025

What would be your suggestions for changing the blue?

Just improve the layout itself with 6.0? Make it more neutral for example.

@fgsw
Copy link

fgsw commented Mar 1, 2025

easily solved via an override.

@bembelimen True … if the user have developer skills.

As long as overrides missing a User Interface non-developer users needs solutions like @webgras provide.

@brianteeman
Copy link
Contributor

Site templates don't have a UI for overrides

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Language Change This is for Translators PR-5.3-dev Updates Requested Indicates that this pull request needs an update from the author and should not be tested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.