Currently, the collapsed state of any item in the blueprint tree is stored in egui's short-term cache. This has several limitations:
- The cache is indexed by widget IDs which are unstable (at least by default). This means that any external change leading to a change in ID (e.g. the item is moved elsewhere in the hierarchy) invalidates the cache, leading to the collapsedness to potentially change. This happens when drag-and-dropping space view across containers.
- It's currently difficult to externally control the current collapsed-ness state
Solving (2) is needed at least for:
Possible approaches:
- Make widget ID predictable/stable (e.g. by deriving them from space view id, etc.).
- How about
DataResults?
- Is there a public egui API to edit the collapsedness of a given widget ID?
- Take over egui and handle the collapsedness state on rerun side.
- Using a
Collapsed component?
- Or using a short-lived ad hoc cache
HashMap<re_viewer_context::Item, bool>?
Currently, the collapsed state of any item in the blueprint tree is stored in egui's short-term cache. This has several limitations:
Solving (2) is needed at least for:
Possible approaches:
DataResults?Collapsedcomponent?HashMap<re_viewer_context::Item, bool>?