Closed Bug 1606584 Opened 5 years ago Closed 5 years ago

Change the folder enumeration MailExtension API from a flat list to a hierarchy

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 74.0

People

(Reporter: protz, Assigned: darktrojan)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

I would like the accounts MailExtension API to preserve the tree-like structure of the folder tree for a given account, rather than require clients to jump through hoops to reconstruct that structure based on string manipulation to split paths in the folder URI.

The attached patch does just that; since it only adds an extra property, I believe the breakage should be close to non-existent and I doubt that anyone relies on this yet.

Thanks,

Jonathan

Attachment #9118294 - Attachment mime type: application/octet-stream → text/plain
Attachment #9118294 - Flags: review?(geoff)
Summary: Fix the folder enumeration MailExtension API before it get too close to a release channel → Fix the folder enumeration MailExtension API before it gets too close to a release channel
Attachment #9118294 - Attachment is patch: true
Assignee: nobody → jonathan.protzenko
Component: General → Add-Ons: Extensions API
Product: MailNews Core → Thunderbird

You realise this is already in Thunderbird 68, right?

My bad -- I somehow thought this hadn't trickled down yet to release. I haven't been following the release cycle very closely.

My claim is that in the current state, the API is not very useful and as such I'm having a hard time imagining that anyone is relying on it.

Blocks: 1606664

This change breaks a whole bunch of tests, so I've fixed them and will post a new patch when I've checked the fix is good.

There are a few known users of this API so we can reach out to them and let them know. Fortunately it's possible to make a simple change that will work with both versions. I'd be even more reluctant to do this otherwise.

Assignee: jonathan.protzenko → geoff
Attachment #9118294 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #9118294 - Flags: review?(geoff)
Attachment #9119669 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9119669 [details] [diff] [review] 1606584-accounts-folders-tree-1.diff Review of attachment 9119669 [details] [diff] [review]: ----------------------------------------------------------------- LGTM, r=mkmelin
Attachment #9119669 - Flags: review?(mkmelin+mozilla) → review+

Thanks for helping out with this. I guess your suggested change will be to flatten the subFolders field, if present, for clients who don't need the tree structure?

Summary: Fix the folder enumeration MailExtension API before it gets too close to a release channel → Change the folder enumeration MailExtension API from a flat list to a hierarchy

(In reply to Jonathan Protzenko [:protz] from comment #7)

Thanks for helping out with this. I guess your suggested change will be to flatten the subFolders field, if present, for clients who don't need the tree structure?

More or less, yes.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/446e3aafa9b9
When listing accounts, return a tree of folders rather than a flattened list; r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 74.0
See Also: → 1520427
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: