Closed Bug 117921 Opened 23 years ago Closed 6 years ago

Want attribute to hide outliner column headers

Categories

(Core :: XUL, enhancement, P3)

enhancement

Tracking

()

RESOLVED WONTFIX
mozilla1.0.1

People

(Reporter: neil, Assigned: janv)

References

Details

Attachments

(1 file)

Rather than fiddling about with some obscure CSS (see e.g. autocomplete.css) it
would be much more useful if developers could use <outlinercols
collapsed="true"> or <outlinercols hidden="true"> to hide the column headers.
Unfortunately the former makes the entire outliner blank and the latter hangs
Mozilla unless you use the DOM inspector to apply it after it is created :-)
The new prefs needs this.

Additionally (maybe seperate bug material), the little column selector dohicky
should be disableable too (prefs DEFINATELY doesn't need it).
OS: Windows 95 → All
Hardware: PC → All
Status: NEW → ASSIGNED
Target Milestone: --- → Future
I just found how it works with XBL select.
- remove "label" attribute from outlinercol
- define style="border: none"
cool

taking for now
Assignee: hyatt → varga
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: Future → mozilla1.0
what about:

outlinercols[hidecols="true"] > outlinercol {
  margin: 0px !important;
  border: none !important;
  padding: 0px !important;
} 
Jan, that worksforme!
Actually, Joe already added a new attribute.

mozilla/themes/classic/win/tree.css
treecol[hideheader="true"] {                            
  -moz-appearance: none;
  border: none;
  padding: 0;
}

Joe, what about more general fix:

xul.css
tree[hidecols="true"] > treecols > treecol {
  -moz-appearance: none;
  border: none;
  padding: 0;
  margin: 0;
} 

attribute can be:
hidecols, hideheaders, borderlesscols, etc.

Yeah, that's obviously a better way to do it.  Hyatt once told me that it would
be possible to do <treecols collapsed="true"/> but that collapses the entire
column, not just the header.  
Attached patch proposed fixSplinter Review
Wouldn't it just make much more sense to just do this if you wanted to hide the
treecolumns?

<treecols hidden="true">
1.
It seems that we add new attributes to root tag <tree>
hidecolumnpicker, seltype, onselect, etc.

2.
Generally, we use |hidden| attribute to hide elements completely, in other words
such element doesn't have any frame even.

The problem with treecol is that we want to visually hide it, but we still need
its frame to be present.
<treecol collapsed="true"/> is not helpfull too, since it has no width and we
need width to correctly paint columns in tree body.

Although, there is one exception, <treecol hidden="true"/> only collapses
<treecol> (frame is not destroyed)
The point is that since <treechildren/> is its own branch - not under the
<treecols/> tag, it makes sense (IMHO), to have the hidden attribute on that tag.
Target Milestone: mozilla1.0 → mozilla1.0.1
Blocks: 120383
No longer blocks: 120383
Better more general fix for xul.css:
treecol[hideheader="true"] {
  -moz-binding: none;
}
But as -moz-binding: none; doesn't currently work I suggest
treecol[hideheader="true"] {
  -moz-binding: url("chrome://global/bindings/tree.xml#treecol-hide");
}
tree.xml
<binding id="treecol-hide"/>
<!--no stylesheet so no styles to undo!-->
Neil, do you really want hideheader for each treecol ?
Nominating for buffy.
I think, XUL developers really need this feature.
Keywords: nsbeta1
Comment on attachment 77094 [details] [diff] [review]
proposed fix

>+tree[hideheaders="true"] > treecols > treecol {
>+  margin: 0px !important;
>+  border: none !important;
>+  padding: 0px !important;
>+}
>+

I still think a separate XBL binding (comment #12) would be more efficient plus
it would also more skinnable as putting styles in xul.css is ugly.
Nav triage team:  nsbeta1-
Keywords: nsbeta1nsbeta1-
*** Bug 116118 has been marked as a duplicate of this bug. ***
Blocks: 232349
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
I don't think anyone is going to work on this given the plan to remove XUL tree widget (bug 1446335).
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: