Last Comment Bug 554926 - Dockable Panels
: Dockable Panels
Status: NEW
: uiwanted
Product: Core
Classification: Components
Component: XP Toolkit/Widgets: XUL (show other bugs)
: Trunk
: All All
: -- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 552982
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-25 07:17 PDT by Neil Deakin
Modified: 2016-03-08 14:07 PST (History)
21 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
prototype (14.98 KB, patch)
2011-03-29 14:42 PDT, Neil Deakin
no flags Details | Diff | Review

Description Neil Deakin 2010-03-25 07:17:42 PDT
Support for panels to be docked into the main window such a sidebar. This involves:

- a button to dock/undock
- events when a dock/undock happens
- panel methods to dock/undock via a script
Comment 1 Rob Campbell [:rc] (:robcee) 2010-07-28 10:18:50 PDT
is this still something we're likely to get for firefox 4?
Comment 2 Neil Deakin 2010-07-28 10:31:15 PDT
Unlikely. Certainly not panels with titlebars.
Comment 3 Neil Deakin 2011-03-29 14:42:03 PDT
Created attachment 522811 [details] [diff] [review]
prototype

This was the prototype I used for http://enndeakin.wordpress.com/2011/03/02/fun-with-toolbars/ but I haven't tested it recently, so it might not work currently.

To create dockable panels:

<panel type="dockable">
  -- stuff goes here --
</panel>

To create docking points:

<dock expand="bottom">

This one creates a dock that expands content downwards when dragged over. If the dock is in a <stack>, the expand attribute isn't needed.
Comment 4 Alex Vincent [:WeirdAl] 2011-06-13 16:28:37 PDT
I'd love to see some mock-ups of what this would look like.  I'm no artist, but it would inspire a few people who can do the work.
Comment 5 Michael Ratcliffe [:miker] [:mratcliffe] 2011-06-16 05:20:31 PDT
This will certainly be useful for all of the Firefox developer tools when it lands.
Comment 6 Neil Deakin 2011-06-27 05:52:10 PDT
To summarize the questions that need to be answered about the UI design for this:

- what should the panel look like when docked into the main window?
- are there UI controls/buttons to undock/close/resize the docked panels?
- can the docked panel be dragged out to undock?
- when undocked into a floating popup, how does one dock the popup again?
- is it possible to close the popup without docking it into the main window?
- what sort of UI is presented when dragging the popup onto suitable docking points, if any?
Comment 7 Colby Russell :crussell (no longer Mozilla-ing) 2011-06-27 06:29:37 PDT
I think making this generic by building up the mechanisms a bit and emulating toolbarpalette and friends would alleviate many of the problems regarding implementation holdup.  Consumers can then blend whichever elements and style as they wish.

(In reply to comment #6)
> - what should the panel look like when docked into the main window?

No different from a xul:box by default.

> - are there UI controls/buttons to undock/close/resize the docked panels?

Not built-in, though it might be a good idea to include a basic binding that can be used without consumers having to roll everything by hand all the time, sort of how you get a column picker for free if you use trees.

<dockcontrols/>?  <splitter/> and <resizer/>

> - can the docked panel be dragged out to undock?
> - when undocked into a floating popup, how does one dock the popup again?

Keeping with <toolbarpalette/>-like approach, the XUL in the window would look something like:

<dock>
  <panel>
    <dockcontrols/>
  </panel>
</dock>

If we go with drag-can-redock, then dragging from the dockcontrols element over a dockpoint (empty <dock/> in the parent window) could do this.

> - is it possible to close the popup without docking it into the main window?

Change the close attribute to a string type and let it take the values close="close" (or keep close="true") and close="dock".  The former is simple close, the latter redocks the panel at its container dock (or the last dock used?  allow a dock attribute on the panel where its value is the id of the dock it will go back home to).

This is still compatible with the current close behavior, assuming the way the close attribute works now is the same as other XUL, i.e., true if non-empty false otherwise.

> - what sort of UI is presented when dragging the popup onto suitable docking
> points, if any?

Drag feedback from dockcontrols by default would look a lot like the black caret that you get for customizable toolbar items and drag and drop for trees—a thick-ish line (black in my case with gnomestripe).

dockcontrols et al can all have appearances admittedly less than satisfactory for the specific consumers you in mind, but everything would be generic enough, e.g., for UX to style and provide feedback about how the generic toolkit form can be improved in its own right.
Comment 8 Neil Deakin 2011-06-29 09:54:18 PDT
I added a good start on the UI spec generally based on what I think would be a basic implementation at https://wiki.mozilla.org/XUL:Panel_Improvements:Docks

The specific appearance would need to be left to a UI designer.

Note You need to log in before you can comment on or make changes to this bug.