API-wise, a display offers the methods onEnable()
/ onDisable()
, which are currently linked to the checkbox, as well as a reset()
method, which can be triggered globally for all displays via the Reset button in the footer. Most displays currently call reset()
in their onDisable()
method() as well, thus clearing the display.
Conceptually we have three different aspects to distinguish:
- Toggling visibility
- Toggling subscription
- Resetting the display
While an additional eye-icon to toggle visibility seems appealing, it raises a major conceptual issue:
Introducing another toggling button (checkbox + eye icon) would allow toggling subscription and visibility separately. However, the Display
base class doesn’t provide an appropriate API to toggle visibility (there is only onEnable
and onDisable
). Augmenting the existing API (e.g. introducing onShow
and onHide
) would invalidate all existing display plugins, which IMO should be avoided - at least in ROS1’s rviz.
Thus, from my point of view, introducing a new toggling button doesn’t make sense. Rather we should stick to the current praxis combining visibility and subscription toggling and linking them to the existing checkbox.
However, I support the idea of factoring out the reset trigger. This could be done by a context menu as originally suggested by @Peter_Mitrano or we could introduce a new reset-icon next to the checkbox, which would be more easily accessible than a context menu. Conceptually, this icon would be a push button triggering the reset, in contrast to a toggle button changing visibility.