Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify time for DataUi queries #980

Merged
merged 22 commits into from
Jan 30, 2023
Merged

Specify time for DataUi queries #980

merged 22 commits into from
Jan 30, 2023

Conversation

emilk
Copy link
Member

@emilk emilk commented Jan 29, 2023

Previously all time queries in DataUi was done on the current set time.

Now the query time (and timeline) can be set by argument. This means we can now easily construct a ui to e.g. show some DataPath at some arbitrary time.

This now allows the streams view (time panel) to show a nice preview of the entity or component being hovered

Probably best reviewed one commit at a time.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I've added a line to CHANGELOG.md (if this is a big enough change to warrant it)

@teh-cmc teh-cmc self-requested a review January 30, 2023 08:05
Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Thanks for the friendly commits :)

) {
match verbosity {
UiVerbosity::Small | UiVerbosity::MaxHeight(_) => {
ui.label("Rigid 3D transform").on_hover_ui(|ui| {
self.data_ui(_ctx, ui, UiVerbosity::Large);
self.data_ui(_ctx, ui, UiVerbosity::Large, _query);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self.data_ui(_ctx, ui, UiVerbosity::Large, _query);
self.data_ui(ctx, ui, UiVerbosity::Large, query);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are arguments only used in recursion (as clippy reminded me friendly). Naming them like this quiets clippy, but perhaps an explicit silencing of clippy would be more instructive

arrow_component_ui(ctx, ui, &component_data, verbosity, query);
}
}
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not delete all of this, that's the classic path isn't it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I figure it's been done in that other PR.

crates/re_viewer/src/ui/time_panel.rs Outdated Show resolved Hide resolved
@emilk emilk merged commit bd5c308 into main Jan 30, 2023
@emilk emilk deleted the emilk/data-ui-refactor branch January 30, 2023 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants