Closed Bug 1778504 Opened 3 years ago Closed 3 years ago

API messages.createTag does not accept named colors like "black" as color

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

Thunderbird 102
enhancement

Tracking

(thunderbird_esr102+ fixed, thunderbird103 fixed)

RESOLVED FIXED
104 Branch
Tracking Status
thunderbird_esr102 + fixed
thunderbird103 --- fixed

People

(Reporter: florian.unger, Assigned: john)

Details

Attachments

(1 file)

Steps to reproduce:

Use new API messages.createTag
as described here https://webextension-api.thunderbird.net/en/latest/messages.html?highlight=tag#createtag-key-tag-color

Actual results:

Calling
messenger.messages.createTag("tagkey", "tagname", "black");

fails with error
Error: Type error for parameter color (String "black" must match /^#[0-9a-f]{6}/) for messages.createTag.

Expected results:

The legacy API
Components.classes["@mozilla.org/messenger/tagservice;1"].getService(Components.interfaces.nsIMsgTagService);
accepted named colors like "black" when creating a new tag.

The new API seems to accept only Hex Code #RRGGBB colors.

It should be mentioned in the API documentation
https://webextension-api.thunderbird.net/en/latest/messages.html?highlight=tag#createtag-key-tag-color
what valid entries for the parameter "color" (string) are.

Component: Untriaged → Add-Ons: Extensions API
Assignee: nobody → john
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → 104 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/30f4a6ac22f0
Improve WebExtension documentation for messageTags and the addressbook. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Comment on attachment 9285467 [details]
Bug 1778504 - Improve WebExtension documentation for messageTags and the addressbook. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
Wrong documentation.

Testing completed (on c-c, etc.):
1 day on Daily.

Risk to taking this patch (and alternatives if risky):
Low. This is only changing descriptions in the schema file.

Attachment #9285467 - Flags: approval-comm-beta?

Comment on attachment 9285467 [details]
Bug 1778504 - Improve WebExtension documentation for messageTags and the addressbook. r=mkmelin

[Triage Comment]

Attachment #9285467 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9285467 [details]
Bug 1778504 - Improve WebExtension documentation for messageTags and the addressbook. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
Wrong documentation.

Testing completed (on c-c, etc.):
1 day on Beta.

Risk to taking this patch (and alternatives if risky):
Low. This is only changing descriptions in the schema file.

Attachment #9285467 - Flags: approval-comm-esr102?

Patch applies cleanly to comm-esr102.

Comment on attachment 9285467 [details]
Bug 1778504 - Improve WebExtension documentation for messageTags and the addressbook. r=mkmelin

[Triage Comment]
approved for esr102

Attachment #9285467 - Flags: approval-comm-esr102? → approval-comm-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: