Bug 447743

Summary: Make List-Id id and phrase available separately to grantlee for header themeing
Product: [Applications] kdepim Reporter: Erik Quaeghebeur <bugs.kde.org>
Component: messageviewerAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: wishlist CC: kdepim-bugs
Priority: NOR    
Version: GIT (master)   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In:

Description Erik Quaeghebeur 2021-12-31 14:13:59 UTC
AFAICT, all variables available to grantlee header theme editors are listed in

https://invent.kde.org/pim/messagelib/-/blob/master/messageviewer/src/header/grantleeheaderformatter.cpp

There, the List-Id header is exposed as a string containing all of the List-Id header content. However, the List-Id header is structured (https://datatracker.ietf.org/doc/html/rfc2919). Namely, it contains the actual id between angle brackets and possibly also a descriptive phrase in front. Because for presentation purposes, the phrase is more useful than the id itself, it would be useful to expose these separately. The grantlee variable header.listid could be modified to have properties/fields for each, so header.listid.phrase (e.g., for display) and header.listid.id (e.g., for in title attribute of element used to display header.listid.phrase). In case the listid variable cannot be modified this way in a backwards-compatible manner, perhaps a new variable, e.g., header.structuredlistid, can be added.