Items in folder pane context menu shouldn't be hard-coded
Categories
(Thunderbird :: Mail Window Front End, defect)
Tracking
(Not tracked)
People
(Reporter: aliledudiable, Unassigned)
Details
With the recent reimplementation of multi-selection in the folder pane (bug 1817605), we now have, in mail/base/content/about3Pane.js , the functions:
- updatePopupForMultiselection()
- updatePopupForSingleSelection()
and they're problematic. They hard-code the set of items on the context menu, instead of iterating through some map, or table of these items. Or, better yet, using the mechanism of controllers and commands in a controller. In fact, I wonder if there isn't some redundancy / overlap with the functionality of the folderPaneContextMenu object, and its _commands
field.
Comment 1•19 days ago
|
||
Why are the problematic? What are you trying to achieve?
Reporter | ||
Comment 2•19 days ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #1)
Why are the problematic?
Because chrome in Thunderbird (and Firefox) is defined declaratively - either fully so with XHTML, or partially, with controllers and other collections - so that when it is rendered or manipulated, the code doing so is more generic; and so that elements of the chrome can be altered in a straightforward, robust and concise manner.
What are you trying to achieve?
For example - adding an item to the context menu.
But even ignoring that, avoidance of redundancy and separating data from code - are already enough a motivation here.
Comment 3•19 days ago
|
||
Well, direct manipulation of the UI like that is not supported. If you're still doing it you can monkey patch those functions as you go.
Description
•