Closed Bug 1520367 Opened 5 years ago Closed 5 years ago

Accounts API: mark special folders with their type

Categories

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

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 66.0

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(2 files)

We should have a field on some special types of folders (junk, trash, outbox, etc.) which says what type of folder they are, so they can be identified easily.

Blocks: webext-tb
Depends on: 1488176
Attachment #9036840 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9036840 [details] [diff] [review]
1520367-webext-folder-type-1.diff

Review of attachment 9036840 [details] [diff] [review]:
-----------------------------------------------------------------

Stealing the review. One minor comment to consider:

::: mail/components/extensions/schemas/accounts.json
@@ +42,5 @@
> +          "type": {
> +            "type": "string",
> +            "optional": true,
> +            "description": "The type of folder, for several common types.",
> +            "enum": ["inbox", "drafts", "sent", "trash", "templates", "archives", "junk", "outbox"]

If you look at other API schemas, they tend to define a type and then $ref it. See for example https://searchfox.org/comm-central/source/mail/components/extensions/schemas/windows.json#11

It is possible this only happens when it is actually used more than once, I haven't verified this.
Attachment #9036840 - Flags: review?(mkmelin+mozilla) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/23ef8a434c94
Accounts API: mark special folders with their type; r=Fallen DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 66.0

I discovered one place where this breaks things because the schema asks for an object, not a MailFolder. Will post a patch shortly.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #9037928 - Flags: review?(philipp)
Attachment #9037928 - Flags: review?(philipp) → review+
Keywords: checkin-needed

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/21ddeb46254b
followup - Change mailTabs schema to use defined type; r=Fallen

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.