Skip to content

Commit

Permalink
Add tooltip to timeline selector (#5842)
Browse files Browse the repository at this point in the history
### What
* Closes #5836
* Blocked by emilk/egui#4338


![image](https://github.com/rerun-io/rerun/assets/1148717/0e53005a-7f75-4239-b20e-1cbddb57451a)


### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[rerun.io/viewer](https://rerun.io/viewer/pr/5842)
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/5842?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/5842?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5842)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
  • Loading branch information
emilk authored Jul 4, 2024
1 parent 01d163c commit 29d9528
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions crates/re_time_panel/src/time_control_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use egui::NumExt as _;

use re_entity_db::TimesPerTimeline;
use re_log_types::TimeType;
use re_ui::UiExt as _;
use re_ui::{list_item, UiExt as _};

use re_viewer_context::{Looping, PlayState, TimeControl};

Expand Down Expand Up @@ -39,7 +39,32 @@ impl TimeControlUi {
time_control.set_timeline(*timeline);
}
}
});
})
.response
.on_hover_ui(|ui| {
list_item::list_item_scope(ui, "tooltip", |ui| {
ui.markdown_ui(
egui::Id::new("timeline_selector_tooltip"),
r"
Select timeline.
Each piece of logged data is associated with one or more timelines.
The logging SDK always creates two timelines for you:
* `log_tick` - a sequence timeline with the sequence number of the log call
* `log_time` - a temporal timeline with the time of the log call
You can also define your own timelines, e.g. for sensor time or camera frame number.
"
.trim(),
);

ui.re_hyperlink(
"Full documentation",
"https://rerun.io/docs/concepts/timelines",
);
});
})
});
}

Expand Down

0 comments on commit 29d9528

Please sign in to comment.