Closed Bug 1669044 Opened 5 years ago Closed 5 years ago

Menus API OnClickData's selectedFolder not showing full MailFolder

Categories

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

defect

Tracking

(thunderbird_esr78 fixed, thunderbird82 fixed)

RESOLVED FIXED
83 Branch
Tracking Status
thunderbird_esr78 --- fixed
thunderbird82 --- fixed

People

(Reporter: bubuanabelas, Assigned: bubuanabelas)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

Install a local extension with the following permissions: ["messagesRead", "accountsFolders", "accountsRead", "downloads", "menus"]

Create a menu with the following contexts: ["message_list", "folder_pane"]

Create a folder and create a couple of subfolders

Right-click on the folder in the folder pane and click the menu created

Actual results:

Viewing the menu's API OnClickData "selectedFolder" property generated by that interaction it only shows accountId, name and path but not subFolders.

Viewing the same folder but by filtering through the account's API MailAccount "folders" property shows the full MailFolder properties.

Expected results:

Both API's to behave the same way.

I belive this can be fixed by changing this line by traversing the folder like in the account's internal function convertAccount but I'm not sure if thats even possible.

I've just modified the code to make it work as I expected and tested it with the same extension without any problems.
Let's hope this patch is useful and can be applied upstream soon!

Thanks for the patch Joaquín. To get it reviewed, to into the spilter review and select the review box, choose :darktrojan as reviewer

Assignee: nobody → bubuanabelas
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #9179789 - Flags: review?(geoff)

Comment on attachment 9179789 [details] [diff] [review]
menu_subfolder.patch

Perfect. Thank you.

Attachment #9179789 - Flags: review?(geoff) → review+

I've made a few tweaks and landed this. It seems there's some infrastructure issues, but a bot should appear shortly and close this bug.

Target Milestone: --- → 83 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/7ed29df27b2a
Add MailFolder's subfolders to displayedFolder and selectedFolder. r=darktrojan

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

Comment on attachment 9179789 [details] [diff] [review]
menu_subfolder.patch

[Approval Request Comment]
WX API correctness fix.

Attachment #9179789 - Flags: approval-comm-esr78?
Attachment #9179789 - Flags: approval-comm-beta?

Comment on attachment 9179789 [details] [diff] [review]
menu_subfolder.patch

[Triage Comment]
Approved for beta

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

Comment on attachment 9179789 [details] [diff] [review]
menu_subfolder.patch

[Triage Comment]
Approved for esr78

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

Attachment

General

Creator:
Created:
Updated:
Size: