Closed Bug 85045 Opened 23 years ago Closed 20 years ago

add a <disclosure/> element

Categories

(Core :: XUL, enhancement)

x86
All
enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: doronr, Assigned: doronr)

References

(Depends on 1 open bug, )

Details

Attachments

(2 files)

After mpt's request for such a feature in the download progress window and ben
telling me that it will need its own widget, I have a working xbl version. The
only issue is that in classic, the onclick="" gets eaten and never executed,
which is why I have not touched the mac classic yet.

Will attach what I have shortly
cool, but ->1.0.  Doron - who should get this?  Why don't you have it?
Target Milestone: --- → mozilla1.0
Wait.  What is a <disclosure> element?
it is based on the mac disclosure-triangle widget (or so i am told). You click
the twisty to show/hide the children of the element. I am sure mpt has a link to
some mac doc or such.
Assignee: trudelle → doronr
See URL. I suggested calling it an <expander/>, because it expands/contracts the
amount of visible chrome depending on its state.
you might as well call it <collapsable/> since it could be construed as 
descending from a <groupbox/> but having the additional feature of being 
'collapsable'.
actually, mpt found a weakness in my implementation - i had the triangle, then a
label to the left of it, and then the children below the label. However, if you
have a grid as a child, you might want the first row to always be visible.
Perhaps a for="" that indicates the id of the last to be shown always child element?
You should call it <expander/> instead, IMHO. 

On mac it's called `disclosure triangle', not just `disclosure'.
the name is easily changeable, the XUL people have the last word on that

In order to allow hiding of certain rows in a grid, I think what is needed is a
second widget, <disclosurehide/> which is placed around the elements you want to
hide/show within the <disclosure/>.  I've played with it and it seems to work
fine. Perhaps a for="" which lists all id's of disclosurehide's that the
disclosure widget should modify should be also implemented, allowing more
control over what to show/hide, as well as easier access (getElementById instead
of having to walk and look for all disclosure hides).
May God have mercy on us all. The 212 bug spam-o-rama is Now!
QA Contact: aegis → jrgm
Ok, so it seems there is now a <button dlgtype="disclosure"/> in the spec, but
nothing about how it should work. Personally, I don't think it fits <button/>,
more checkbox for that matter.

For an example of a hack functionality, check mailnews. Open any message, the
area where the mail info and attachment section is has an arrow that
expands/hides the detailed information.

I have 2 implementations of <expander/> currently:

1) clicking the arrow hides/shows all children. It has a label that is placed to
the right of the arrow, children below.  Perhaps add like the groupbox a
<caption> to allow a more complex label.

2) in addition to 1), have a shows="" attribute that stores the id's of the
elements to be hidden/shown (via collapsed).  This gives more power to the user.
Example: hide/show certain parts of a <grid>.  The only issue with this is that
I have not found a good way to hide all the elements be default.
another collapsable element is in a  toolbar. (the collapser widget) I've 
been able to (mis) use that in test files to expand and collapse arbitrary 
content - much like a disclosure element might.
forgot to add, what I am basically looking is for some sort of spec. Or should I
just submit what I have to a newsgroup and discuss it there?
this is what I currently have, obviously needs some more work. the |shows|
attribute holds the ids that are to be hidden/shown, however they are not hidden
yet by default.
Posting a strawman spec for discussion in a newsgroup seems like a good course
to take.
Attached patch newer versionSplinter Review
I followed hyatt's advice from irc and now add a "load" event listener to
collapse all elements listed in the "shows" attribute.
Adding kw.

It would be great if we could get this review moving so I can get working on the
cookie (and blocked image) information bug? 

Doron, how ready is the latest patch? 

Hyatt, can you give a brief once-over to say what's good?
Blocks: 23508, 110746
Keywords: patch, review
Just saw that the patch is corrupted on one line

ndex: xpfe/global/resources/content/xul.css

should natrually be:

Index: xpfe/global/resources/content/xul.css
since this probably won't be in xul1.0, future
Status: NEW → ASSIGNED
Target Milestone: mozilla1.0 → Future
No longer blocks: 23508
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
Any reason for the silent status change?
Such a change would be part of XUL 2.0, and as far as I can see there is no need
for this.  If XUL 2.0 decides this is needed, we can reopen or probably open a
new bug.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: