This repository has been archived by the owner on Nov 6, 2019. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have a requirement for a Widget that has much of the functionality of a
DockPanel
but without the concept of tabs and a more granular API. This is my initial stab at such functionality. ADashboardLayout
is essentially aDockPanel
with the following modifications:TabBar
. It is up to the Widget to define its own "header" and/or drag and drop functionality if desired.DockPanel
are supported.DashboardPanel
:areaResized
which is called when a handle is dragged,widgetRemoved
, andlayoutRearranged
which is fired when a widget is dragged and dropped from one place within the panel to another.resizeLayoutArea
method allows explicitly setting the relative sizes of a split area. In order to accomplish this, areas within aDashboardPanel
are assigned UUIDs at creation.We will likely need some of this functionality in a
DockPanel
as well, but this can serve as at least a starting point for discussion of some of the Signals and mutation API methods that would provide much more granular programmatic interactions. There is a great deal of duplicated code between this and theDockPanel
which of course is not ideal. I'm up for suggestions on refactoring / extracting common functionality elsewhere.I included an example implementation in the
example-dashboardpanel
package demonstrating much of the functionality, including save/restore and drag and drop.