Show spam status in 5.2 header
ClosedPublic

Authored by knauss on Jun 24 2016, 9:45 AM.

Details

Summary

We also want to be able to show the spam status in 5.2 header

Diff Detail

Repository
R81 KDE PIM Addons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
knauss updated this revision to Diff 4698.Jun 24 2016, 9:45 AM
knauss retitled this revision from to Show spam status in 5.2 header.
knauss updated this object.
knauss edited the test plan for this revision. (Show Details)
knauss added reviewers: colomar, mlaurent.
Restricted Application added a project: KDE PIM. · View Herald TranscriptJun 24 2016, 9:45 AM
Restricted Application added a subscriber: kde-pim. · View Herald Transcript
knauss updated this revision to Diff 4699.Jun 24 2016, 9:52 AM

remove unnedded changes

This is how it looks afterwards:

(on the left side it is the settings dialog, that I changed to from "show spam status in fancy headers" -> "show spam status in headers"

Just wondering: since we support 3rd party themes that might or might not support spam status, does it even make sense to have the option in the settings? You enable the option and then install a theme that does not support it -> bug (from user's point of view).

Wouldn't it be better - even from security point of view - to *always* show the spam status header? The only exception would be if there is no spam status information in the mail headers of course.

Just wondering: since we support 3rd party themes that might or might not support spam status, does it even make sense to have the option in the settings? You enable the option and then install a theme that does not support it -> bug (from user's point of view).

Wouldn't it be better - even from security point of view - to *always* show the spam status header? The only exception would be if there is no spam status information in the mail headers of course.

+1 get rid of this optionin the gerneral settings, and make the themes responsible for that.

knauss added inline comments.Jun 24 2016, 10:43 AM
plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/header.html
83

(a little bit unrelated)
shouldn't we switch to use i18n grantlee support? I think it is much more readable if we do the translation directly in the grantlee itself and we can fix more easily forgotten untranslated strings like Sender/List-Id in this case:

   [...]
    {% if header.ListId %}
    <div class="row">
	​      <div class="headerleft">{% i18n "List-Id:" %}</div>
	​      <div class="headerright">{{ header.ListId }}</div>
    </div>
    {% endif %}
    <div class="row">
	​      <div class="headerleft">{% i18n "Date:" %}</div>
	​      <div class="headerrightdate" dir="{{ dateDir }}">{{ header.dateshort }}</div>
    </div>
   {% if header.spamHTML %}
	   <div class="row">
	​      <div class="headerleft">{% i18n "Spam status:" %}</div>
  [...]
dvratil added inline comments.Jun 24 2016, 10:52 AM
plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/header.html
83

The advantage of having the strings coming from KMail is that it also provides localization for 3rd party themes.

(the harcoded List-Id string is wrong of course, should be also localizable).

colomar edited edge metadata.Jun 24 2016, 11:48 AM

Agreed: If we have spam status information, it should be shown, and if users don't like it, they can switch to a theme that does not show them.
It might be nice if we could provide at least one theme variant that does not have spam status ourselves (and says that in the name) so that users have an easy way to get rid of the spam status field.

mlaurent added inline comments.Jun 24 2016, 3:18 PM
plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/header.html
83

+1 don't move i18n in grantlee support otherwise we will lose translation for other theme.

mlaurent edited edge metadata.Jun 24 2016, 3:20 PM

We have already have an option to show or not spam status. So not necessary to add a new one.

We have already have an option to show or not spam status. So not necessary to add a new one.

My suggestion was to actually remove the option completely and just always show the spam status. It's a security feature after all, why should anyone ever want to disable this?

Ah! remove option to show it all the time when it exists.
Ok seems logic for me.

So to summerize:

  • spam status in 5.2 theme
  • delete config for disable spam status completly
  • fix notranslated header fields ( in seperate patch)
  • add a 5.2 variant without spam header y/n?
  • do not use i18n grantlee support for string, that will be also put into others themes
plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/header.html
83

but external apps can also load the translations of messageviewer/ kdepim-addons so we would not nessarily loos the that with grantlee i18n support. But in the end it is a code desgin desision.

"add a 5.2 variant without spam header y/n?"

For me we mustn't create a new theme for just add or not spam status.
Otherwise we don't remove settings in kmail to show or not spam status and we fixed problem :)

"add a 5.2 variant without spam header y/n?"

For me we mustn't create a new theme for just add or not spam status.
Otherwise we don't remove settings in kmail to show or not spam status and we fixed problem :)

+1, no on/off option and all build-in themes *with* spam header

This revision was automatically updated to reflect the committed changes.