controlWidgetVisibility
: Give us your thoughts!
#859
Replies: 3 comments 1 reply
-
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. |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Feature description
The
controlWidgetVisibility
feature 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.Hidden
orWidgetState.Unloaded
state will show up in the dropdown menu whenAdd widget
is clicked. When theClose widget
button 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?
widgetActionDropdown
or another strategy might be requiredBeta Was this translation helpful? Give feedback.
All reactions