Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaffold: Allow panel to specify supported dock locations #9

Open
ldosmorbrian opened this issue Aug 29, 2023 · 0 comments
Open

Scaffold: Allow panel to specify supported dock locations #9

ldosmorbrian opened this issue Aug 29, 2023 · 0 comments

Comments

@ldosmorbrian
Copy link

ldosmorbrian commented Aug 29, 2023

Update how we configure the buttons in some appropriate way to allow for naming which buttons are available.
Keep dockLocationButton: true as you have it – and if the config specifies that without the below customizations – then it will work just as you have it – showing all supported dock locations on the menu.

But allow customization such that the developer can specify an array of supported locations. * This will allow us to specify something like [ "left", "right" ] — implying the panel can only be docked to the left or right, but does not support being docked to bottom or modeless.

This matters because certain events are treated differently in for example "modeless".
Some panels may have custom designs that don't make sense to open at "bottom" so it will be better not to provide unsupported options to the user.

Config Example1: only specifies dockLocationButton: true * Will show all dock buttons

Config Example2: only specifies dockLocations: [ .... ] * if the array is empty no buttons are displayed

any supported location string in the array will show the button — the order of the buttons on the panel should NOT be different than the usual order, regardless of how they are ordered in the array.
if an unsupported location is in the array, then it is ignored.

Config Example3: specified both dockLocationButton AND dockLocations array * when dockLocationButton is false the dock location button will not be displayed for the panel, regardless of the other dockLocations array.

when dockLocationButton is true when there is also a dockLocations array, then the treatment of the dockeLocations array is the same as Config Example2 above.

Reference: 11867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant