You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the ListItem code is duplicated, along with the logic around selection highlight, selection update on click, shared hover state, etc. Ideally, the UI code for this would be unified and reused across the viewer.
To be addressed
There is significant overlap with the existing "Data UI" code, in particular impl DataUi for re_viewer_context::Item. However, it's not clear that both the "ItemListItem" and the "Data UI" code can be fully merged, as they serve slightly different (albeit sometime overlapping) needs.
A given type of item might need slightly different behaviour depending on context. For example, a Space View listed in the Blueprint tree might have a "visibility toggle" button, but not when listed as a child from a container in the Selection Panel.
Also, sometime items are to be displayed as part of a hierarchy, and other times as part of a flat list.
Possible pragmatic approach
Accept these are two different things and roll a new ListUi trait along DataUi, in the same re_data_ui crate.
Somehow make it flexible enough for the contextual variations.
The text was updated successfully, but these errors were encountered:
In a growing number of place, we are now using
re_ui::ListItem
to display and interact withre_viewer_context::Item
s. That includes:In the future, this will also include:
ListItem
style for the component list (in the Selection Panel when an entity is selected) #4161)Currently, the
ListItem
code is duplicated, along with the logic around selection highlight, selection update on click, shared hover state, etc. Ideally, the UI code for this would be unified and reused across the viewer.To be addressed
impl DataUi for re_viewer_context::Item
. However, it's not clear that both the "ItemListItem" and the "Data UI" code can be fully merged, as they serve slightly different (albeit sometime overlapping) needs.Possible pragmatic approach
ListUi
trait alongDataUi
, in the samere_data_ui
crate.The text was updated successfully, but these errors were encountered: