controlWidgetVisibility: Give us your thoughts!
#859
Replies: 4 comments 5 replies
|
I'd vote to make this an opt-in feature. I see the benefits for some widgets that are expected to be presented at all times (ex. properties, model/category selector), but less so for civil profile, sheet viewer, or any other 'state sensitive' widget. |
|
I was initially confused when I saw add/close widget but discovered that it means show/hide widget. So why not just use those words since they seem more clear as to what is happening? |
|
I agree it should be an opt-in feature, but I'd personally rather have an option on the tab itself, similar to how it would work in a browser. |
|
@GerardasB Has there been any movement on this? My team would love to adopt it, but I want to get an idea if/when this would come out of preview. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Feature description
The
controlWidgetVisibilityfeature enhances widget containers by introducing additional buttons in their title bar. These buttons provide the functionality to add or remove widgets, giving users more control over the visibility and organization of their widgets. This feature aims to improve user interaction and customization capabilities within the application.The preview feature uses existing APIs, so widgets with the
WidgetState.HiddenorWidgetState.Unloadedstate will show up in the dropdown menu whenAdd widgetis clicked. When theClose widgetbutton is clicked state is set toWidgetState.Hidden. That means that the widget React and DOM state is persisted as well.For use cases where application logic would prefer to keep widgets "hidden" until some condition, we suggest registering/unregistering a provider only when needed.
Live demo
Note
Released in 4.14.0.
Why is it a preview feature?
widgetActionDropdownor another strategy might be requiredAll reactions