-
Notifications
You must be signed in to change notification settings - Fork 168
GH-223 Enable / Disable Tab Dragging in DockPanel #275
base: master
Are you sure you want to change the base?
Conversation
I'm not convinced this is the right solution for making a "dashboard" type layout. In the |
Well I can't comment until I see the new code, but am now intrigued - does it also support dragging and stacking of panels in a similar tabbed way? FWIW being able to enable / disable the runtime configuration of the DockPanel (based on user / mode) is still a useful thing to me and I do have a real world use for it... |
No, it doesn't have that ability. It's just a "static" layout. Can you describe your use case a bit more? It may be something that can be handled semantically with a new DockPanel |
The reason I'm probing is because there may be other interactions we want to control for this use case as well, like disabling drag/drop altogether so that other widgets can't be dropped. We could do that while still allowing the tabs to be reordered. |
I am potentially going to be adopting phosphor for several scenarios, but this "fix" gives me enough to go ahead and drop it in here: http://rawgit.com/hpcc-systems/Visualization/master/demos/dermatology.html?src/layout/Grid.complex&designMode=false
The main reason I was drawn to phosphor was the ability to drag and stack the tabs at a user configurable level. The other features are:
Everything else is falling into the over engineering category for now! |
(Obviously if there are cleaner implementations I am open to suggested approaches etc. still just getting my fingers dirty.) |
FYI: You can use CSS to expand the tabs to fill the whole tab bar. So the dashboard you linked is use a grid-style layout, whereas the dock panel is (effectively) a hierarchy of vertical/horizontal box layouts. In a grid-style layout, the edges of widgets remain aligned to row and column boundaries, which is not the case for the dock panel. I would think most dashboard authors would want the grid-style layout. We do have plans to address dashboarding this year, so I'm hesitant to add stuff to dock panel when it's not actually solving the right problem. I would be possible to build a drag/drop dashboarding tool based on a grid layout, we would just need to specify what the interactions/features should be. |
...but the reason I landed on phosphor was the new requirement to allow users to drag the dashboards on top of each other, to create a tabbed interface... IMO this Issue / PR shouldn't be defined by the dashboard use case - let me throw a different scenario at you: I am also developing a web based IDE / Debugging tool and I want to create a bunch of pre-canned layouts for the users based on what they are doing and what features they have access to. As a visual idea something like this: http://52.51.90.23:8010/?Widget=ECLPlaygroundWidget but with more (optional) capabilities. |
Ok. If you don't want the layout to be reconfigurable, do you still want the tabs to re-orderable within a given tab bar? And what about resizing of the existing sections interactively? i.e. to what extent do we need to "lock down" the interactivity of the layout? |
Locking down the detach and tab ordering while leaving the split pane resizable is actually perfect for what I need. |
What's your timeline on requiring this feature? |
No rush as I can drive on with my forked version (with the naïve implementation). |
@sccolbert Any more thoughts on the dashboarding use case? We're essentially looking for a DockPanel sans tabs. Everything else is really useful: intuitive drag n drop, import/exporting layouts, and drag-to-resize. I can take a stab at it if it's buried in your backlog. |
...I am a bit surprised this PR was never pulled - I know I find the option useful and its not like the code is invasive, just exposing a feature which is available internally. |
Allow user to enable / disable tab dragging at runtime. Fixes phosphorjsGH-223 Signed-off-by: Gordon Smith <gordonjsmith@gmail.com>
Allow user to enable / disable tab dragging at runtime.
Fixes GH-223
Signed-off-by: Gordon Smith gordonjsmith@gmail.com