Open Bug 1746196 Opened 4 years ago Updated 10 months ago

Display all tags of a mail, even if the tag does not exist in Thunderbird

Categories

(Thunderbird :: Message Reader UI, enhancement)

Thunderbird 91
enhancement

Tracking

(Not tracked)

People

(Reporter: adrien.rybarczyk, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36

Steps to reproduce:

Add a tag to a mail (outside Thunderbird). This tag must not exist in Thunderbird.

Actual results:

The tag is not mentioned among the different tags.

Thunderbird does retrieve the results.
Example:
gFolderDisplay.selectedMessage.getStringProperty("keywords")
"$label3 test"

Expected results:

Showing different tags. This would allow to keep the tags we create if we ever share our mailbox.
Custom tags have the same value for the key and tag properties.

In mailWidgets.js, instead of:

let tagName;
try {
// if we got a bad tag name, getTagForKey will throw an exception, skip it
// and go to the next one.
tagName = MailServices.tags.getTagForKey(tagsArray[i]);
} catch (ex) {
continue;
}

replace by:

let tagName;
try {
// if we got a bad tag name, getTagForKey will throw an exception
tagName = MailServices.tags.getTagForKey(tagsArray[i]);
} catch (ex) {
//we define the tagName as the name of the key
tagName = tagsArray[i];
}

It will be necessary to define a default color for the tags in this case.

From an UX pov, I think this would be desirable.
Can someone comment on the technical side? (see comment 0)

Flags: needinfo?(mkmelin+mozilla)

I think this is doable.
I'm not sure if there's any potential risk of displaying all available keywords in a message.

To expand on this, it would be nice to offer a quick "Save tag" click for this external tags.
I'd suggest to style them as a partially fade out tags with a dashed line around, similar to what we do for calendar events not yet processed.

The forwarded messages have the tag "forwarded". Maybe this tag is not useful to display for the user?

gFolderDisplay.selectedMessage.getStringProperty("keywords")
"forwarded"

Moreover, it is not enough to modify only mailWidgets.js. If ever a mail has just tags not displayed, the modification of comment 1 is not enough.
You will also have to modify SetTagHeader of msgHdrView.js.

We do auto-tagging for feed categories already (see bug 946279). For IMAP it's of course a bit more complicated... but doable yes.

Flags: needinfo?(mkmelin+mozilla)
Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 547825

This option would be very interesting. I use more than 4 computer for the same thunderbird profil (same email). If someone create a tag it will not be seen by the others. We need to copy the prefs. js file between the different computers.

You need to log in before you can comment on or make changes to this bug.