Add support for rank to the top area #7278
Merged
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.
References
Partially related to #6096.
#6096 is more general and also considers the
main
area.This change is only for the
top
area.Code changes
Add a
PanelHandler
wrapper to store the widget ranks for the top area.It should be possible to use the same wrapper for the
header
andbottom
areas too, and potentially merge it with the existingSideBarHandler
(also sorting its widgets).Ideally all areas should support ranks by default. However as pointed out by @Madhu94 in #6096 this might become tricky for the
main
area (is there a notion of rank / order for this area?)Developer-facing changes
Third-party extensions (example) can now use the
rank
parameter when adding widgets to the top area:User-facing changes
None
Backwards-incompatible changes
None