-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
New layout for welcome email #4244
Conversation
@MorrisJobke, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jancborchardt, @eppfel and @rullzer to be potential reviewers. |
97e1c1d
to
8bbc1fb
Compare
There are now also unit tests for this helper. That checks if a working (nearly the same as the example by @Espina2 ) template gets produced. |
8bbc1fb
to
04ef6e5
Compare
@LukasReschke Could you please have a look at the failing unit tests? That would be awesome :) |
@MorrisJobke Nice work!! |
Tests should be fixed now @MorrisJobke |
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.
Works fine here. With regards to the theming integration I'd recommend:
- For the header just use the configured logo of the instance.
- For the footer use nothing if a custom logo is configured. If none is configured use the Nextcloud logo.
With regard to the color issue pointed out by @Espina2, what is the hex code that we should use there? :-)
lib/private/Mail/IEMailTemplate.php
Outdated
* | ||
* @param string $logoUrl | ||
*/ | ||
public function addHeader($logoUrl); |
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.
I'd say we can remove $logoUrl
from the interface. Let that automatically be detected. Also easier because otherwise it's a mess if you in the controller have to detect theming etc…
lib/private/Mail/IEMailTemplate.php
Outdated
* @param string $logoUrl | ||
* @param string $text | ||
*/ | ||
public function addFooter($logoUrl, $text); |
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.
Also here I'd remove $logoUrl
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.
Also let's make the text optional and by default go with the default footer :)
Yikes… The Provisioning API has a "Resend welcome mail" endpoint which was implemented by copy-pasting from the user creation controller. Absolutely not error prone 😉 Let me adjust that… |
$mailData = array( | ||
'username' => $username, | ||
'url' => $link | ||
$emailTemplate = new EMailTemplate($this->defaults); |
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.
Let's add a getEmailTemplate
helper to IMailer
instead :-)
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.
Mhm. Actually not sure, separation of concerns et al, need to think about it :)
Note that I've removed the small gray Nextcloud logo at the bottom simply because that will cause a mess with theming and we should aim for consistency. And this is also already way nicer than before 😄 |
f955f16
to
64e2d88
Compare
Review time |
Codecov Report
@@ Coverage Diff @@
## master #4244 +/- ##
============================================
+ Coverage 54.04% 54.08% +0.04%
- Complexity 21299 21329 +30
============================================
Files 1259 1259
Lines 74231 74303 +72
============================================
+ Hits 40115 40186 +71
- Misses 34116 34117 +1
Continue to review full report at Codecov.
|
I tested the changes and it works really nice 👍 from me |
* thanks to @Espina2 for make this nice design * the button says "Set password" if the admin didn't specified a password Signed-off-by: Morris Jobke <[email protected]>
Signed-off-by: Lukas Reschke <[email protected]>
Add support for theming in generated emails and simplify API Signed-off-by: Lukas Reschke <[email protected]>
Signed-off-by: Lukas Reschke <[email protected]>
2108d60
to
8daf3d4
Compare
👍 |
What does the text version look like? |
Thou shall take a look at the unit tests 😉 |
Basically the same as before. It's only the text in the same order just without logo and styles. |
I really prefer if after the Welcome a board, we have the name of the person, it would look like the email is written by one people and not autogenerated, looks more personal. |
Thank you guys :) 👍 |
But in some cases we don't have the name. If the name is available we will put it there. 😉 |
cc @Espina2 |
Awesome sauce! 🚀 |
Awesome. Nice work Morris! |
You had the major impact on this! You designed a really awesome template :) Thank you as well :) You rock 🚀 😄 |
Great work everyone! :) |
@juliushaertl @Espina2 @jancborchardt @LukasReschke @rullzer @tobiasKaminsky For a first feedback