Show all entities/components in the Streams UI, even if empty for the selected timeline#3779
Conversation
… selected timeline
73e96c7 to
f8edf1b
Compare
| let tree_has_data_in_current_timeline = tree | ||
| .prefix_times | ||
| .has_timeline(ctx.rec_cfg.time_ctrl.timeline()) | ||
| && tree.num_timeless_messages() == 0 | ||
| { | ||
| return; // ignore entities that have no data for the current timeline, nor any timeless data. | ||
| } | ||
| || tree.num_timeless_messages() > 0; |
There was a problem hiding this comment.
It's great that you made a readable variable out of this, but let's take it to the logical conclusion and make helper function for this: tree.has_data_in_current_timeline or similar
There was a problem hiding this comment.
Also note that this will return true for world if data is logged to world/point, since world is a prefix of world/point
There was a problem hiding this comment.
Also note that this will return true for world if data is logged to world/point, since world is a prefix of world/point
Yeah, that's the desired behaviour for reporting "emptiness" I think.
| let component_has_data_in_current_timeline = | ||
| data.times.has_timeline(ctx.rec_cfg.time_ctrl.timeline()) | ||
| || data.num_timeless_messages() > 0; |
There was a problem hiding this comment.
again, this could be turned into a helper function for even more increased readability (even though this is already an improvement)
|
@emilk The annoying thing with those helper function is that they require stuff from very different places inside My follow-up PR would quite naturally add a Also, note that in |
What
Before, the Streams UI would only include those entities/components that either have data logged on the currently selected timeline, or timeless data logged. This means that depending on the user code, no data could end up being displayed, or the tree content could vary depending on the selected timeline.
This PR changes the behaviour such that all entities/components are now always displayed in the Streams UI, and it adds a conspicuous note in the tooltips to indicate why the timeline might be empty.
This is a first step in addressing #3733. A follow-up PR should further enhance the styling of hidden entities/components to make it more obvious that they are "timeline-shadowed", and apply the same to the Blueprints Tree UI.
Partially addresses:
Checklist