[meta] Remove the XUL "tree" widget
Categories
(Core :: XUL, task, P5)
Tracking
()
People
(Reporter: Paolo, Unassigned)
References
(Depends on 15 open bugs, Blocks 5 open bugs)
Details
(Keywords: meta)
Attachments
(1 file)
1.82 KB,
text/html
|
Details |
Comment 1•7 years ago
|
||
Reporter | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Reporter | ||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 7•4 years ago
|
||
This is a mockup of a Grid layout that could be used for simple cases of XUL trees like for example the History Sidebar etc.
Comment 8•4 years ago
•
|
||
(In reply to Mats Palmgren (:mats) from comment #7)
Created attachment 9200156 [details]
Simple tree using grid layoutThis is a mockup of a Grid layout that could be used for simple cases of XUL trees like for example the History Sidebar etc.
Thanks! This solves the layout bit in a way that can be integrated in custom elements (since it keeps the DOM structure). Unfortunately, there are other bits too:
Basic things that would need to be taken care of:
- ability to select rows
- rewriting styling (:-moz-tree-* pseudos)
- porting XULTreeAccessible, this relies heavily on the layout frames, but I guess the CE can set the right aria roles if we used DOM elements.
- porting nsITreeSelection/nsITreeView usages: the whole tree CE relies on these for keyboard navigation, handling clicks, populating content and other things. This will probably need a better API to be more suited for real DOM elements.
- potentially perf (notably for bookmarks/history stuff)
There are more specific features too, that only certain places use:
- context menus (I think only the places-tree derived CE uses those, so it could be generated there)
- resizable columns (this can probably be done with some listeners that change the
grid-template-columns
or simply go away) - checkbox cells, these are used mostly in <richlistbox> style usages (zero-depth), in about:preferences mainly
- editable cells (afaik only the search engine tree in about:preferences#search use them): that tree could potentially re-use the "Add new engine" dialog, but in an editing state
- reordering/dropping rows (for bookmarks)
- <treecolpicker>: allows showing/hiding columns, but not sure that's really important.
Overall, given the complexity of trees, a lot will need a rewrite. So it's worth looking closely at what feature set the replacements would have. The prototype is well suited for tree-table type things, but most usages are either trees or tables, so rewriting them may be faster.
Though, one thing that could be sorted out now is maybe making <treecol> use CSS grid when it's not inside a <tree> (many places do that).
Comment 9•4 years ago
|
||
(In reply to Tim Nguyen :ntim from comment #8)
(In reply to Mats Palmgren (:mats) from comment #7)
Created attachment 9200156 [details]
Simple tree using grid layoutThis is a mockup of a Grid layout that could be used for simple cases of XUL trees like for example the History Sidebar etc.
There are more specific features too, that only certain places use:
...
Overall, given the complexity of trees, a lot will need a rewrite. So it's worth looking closely at what feature set the replacements would have. The prototype is well suited for tree-table type things, but most usages are either trees or tables, so rewriting them may be faster.
Yeah, something like this wrapped up in a Custom Element looks like a nice solution for simpler trees. For Places and more complex consumers, writing a drop-in API replacement seems unlikely. To take Places as an example, I'd want to start with some analysis of design & product requirements - how can users be most successful finding history & bookmarks & what features are needed to help with that? Then some combination of rewriting the consuming code and pulling out shared functionality where possible, especially in areas that are hard & xul tree is uniquely good at like perf.
Updated•2 years ago
|
Description
•