-
-
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 emails for sharebymail #4307
Conversation
@MorrisJobke, thanks for your PR! By analyzing the history of the files in this pull request, we identified @schiessle, @jancborchardt and @LukasReschke to be potential reviewers. |
@nextcloud/designers I'm also open for new wordings of the emails, because it's a lot of duplicate text. Maybe you have better ideas. cc @Espina2 |
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.
Awesome stuff. Lets do this!
d2de4d5
to
4e54bc7
Compare
Rebased upon master. |
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 HTML mail looks awesome! But the text mail looks strange:
admin shared »welcome.txt« with you
admin shared »welcome.txt« with you. Click the button below to open it.
Open »welcome.txt«: http://localhost/master/index.php/s/RPGlwrxTJr2lrm5
--
Nextcloud - a safe home for all your data
This is an automatically generated email, please do not reply.
Can we fix this?
i will fix |
Not entirely sure about that. For example in the activity app we would have an email that uses something like:
In this case having HTML allowed here for URLs (and a separate text for plain text) may be very useful. Also I think sometimes some stuff like |
Also HTML may be useful when embedding icons like the activity state icons. Just a thought though :-) |
I fixed the footer for the plain text mails. The plain text mail looks now better, also with the changes by @nickvergessen : Although I think the "Click the button below to open it." still sounds a bit strange for a plain-text mail. I think the best would be to create two separate templates. This way we can make sure that we have a useful text in both cases and that we have reasonable line breaks, which is not a issue here but maybe with other mails (something <= 80 chars). |
@schiessle |
I think you can more information like that. @MorrisJobke |
@Espina2 Just plain perfection. |
@nickvergessen I saw it. The "problem" is that we then have to split it up in two "addBodyText()" calls which will result in a line break, right? ... but I will try. |
Not sure what you did, but I made two little commits and it looks good |
Signed-off-by: Morris Jobke <[email protected]>
Signed-off-by: Morris Jobke <[email protected]>
Signed-off-by: Morris Jobke <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
…--'. It also adds a line break in front so that there is some spacing between the mail body and the footer Signed-off-by: Bjoern Schiessle <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
00393d0
to
983210d
Compare
Codecov Report
@@ Coverage Diff @@
## master #4307 +/- ##
=============================================
- Coverage 54.03% 37.68% -16.35%
+ Complexity 21417 21407 -10
=============================================
Files 1321 1317 -4
Lines 81696 81630 -66
Branches 1305 1305
=============================================
- Hits 44147 30765 -13382
- Misses 37549 50865 +13316
Continue to review full report at Codecov.
|
Tested and works nice 👍 |
@@ -461,7 +461,7 @@ public function addFooter($text = '') { | |||
|
|||
$this->htmlBody .= vsprintf($this->footer, [$text]); | |||
$this->htmlBody .= $this->tail; | |||
$this->plainBody .= '--' . PHP_EOL; | |||
$this->plainBody .= PHP_EOL . '-- ' . PHP_EOL; |
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.
When you update stuff like this, then you should also update the unit tests. Let me do this.
Signed-off-by: Morris Jobke <[email protected]>
I fixed the unit tests. Looks good now from my side 👍 |
htmlspecialchars
(is this enough, @LukasReschke ) - this was needed to show also file names in there and not cause code injection (the escaping is only done in the HTML emails and not in the text emails