Deal with reviewer comments in D200242
Categories
(Thunderbird :: Folder and Message Lists, task)
Tracking
(Not tracked)
People
(Reporter: john, Unassigned, NeedInfo)
References
Details
| Reporter | ||
Comment 1•1 year ago
|
||
Does this comment from Alessandro still require work?
Indeed, there's a little bit of messed up architecture in the about3Pane regarding this.
We have some instances in which we fetch the columns via ThreadPaneColumns.getDefaultColumns() and then we update that object with all the visible/hidden columns and store it inside the threadPane.columns.
These are all the instances in which we're making the object returned by getDefaultColumns() stale.
https://searchfox.org/comm-central/search?q=this.columns+%3D+&path=about3Pane.js&case=false®exp=false
We should update this and ensure that the thread-pane-columns.mjs file always holds the source of truth of the currently visible and custom columns for the needed view.
Algon these lines we should also convert DBViewWrapper.jsm to a system module so we can more easily us it inside our modules.
Martin, what do you think?
Not sure if you want to do it or I could do it in a separate patch you can then rebase this off of.
Whenever a custom column is added, it also gets added to the DEFAULT_COLUMNS array. That array is never returned as a reference, but always as a clone, so each consumer gets its own fresh copy, which should always be the most recent known correct default state. The correct default state for custom columns is defined by the add-on it was added by.
We currently do not have different default data for the different view types (synthetic/folder) and if we want that, it needs to be defined by the add-on. Since we recently introduced the concept of a synthetic view to the WebExtension API, that would be possible now.
From my current understanding, the ThreadPaneColumns.mjs file does hold the source of truth of the currently visible and custom columns for the needed view (with respect to defaults).
Description
•