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

Add experimental Dataframe Space View #4468

Merged
merged 14 commits into from
Dec 13, 2023
Merged

Add experimental Dataframe Space View #4468

merged 14 commits into from
Dec 13, 2023

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Dec 11, 2023

What

Add a new kind of space view—called Dataframe Space View—which display the raw data of the entities added to it. This first iteration display data with the "latest at" semantics, with each rows corresponding to an entity instance.

This features is experimental and has plenty of usability issues (whose growing list is tracked in #4466). As a result, it is disabled by default and can be enabled in the options.

For the purpose of this feature flag, this PR adds support for de-registering a space view from the registry.

image image

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
    • Full build: app.rerun.io
    • Partial build: app.rerun.io - Useful for quick testing when changes do not affect examples in any way
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@abey79 abey79 added ui concerns graphical user interface include in changelog labels Dec 11, 2023
@abey79 abey79 force-pushed the antoine/table-space-view branch from 8128095 to 08923a8 Compare December 11, 2023 11:29
@abey79 abey79 changed the title Add Dataframe Space View Add experimental Dataframe Space View Dec 11, 2023
Base automatically changed from antoine/create-empty-space-views to main December 11, 2023 14:42
@abey79 abey79 marked this pull request as ready for review December 11, 2023 14:50
@abey79 abey79 force-pushed the antoine/table-space-view branch from 03e865e to c9adfe2 Compare December 11, 2023 15:27
@teh-cmc teh-cmc self-requested a review December 12, 2023 07:38
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! Some stuff I would consider blocking for a production view, but since this is behind a feature flag I'll pre-approve.

Also: some auto-sizing for the columns would be very much appreciated 👀
image

crates/re_space_view_dataframe/src/space_view_class.rs Outdated Show resolved Hide resolved
crates/re_space_view_dataframe/src/space_view_class.rs Outdated Show resolved Hide resolved
crates/re_space_view_dataframe/src/space_view_class.rs Outdated Show resolved Hide resolved
.iter()
.flat_map(|entity| {
store
.all_components(&query.timeline, entity)
Copy link
Member

Choose a reason for hiding this comment

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

You've already made that same query just above!

Comment on lines 161 to 166
get_component_with_instances(
store,
&latest_at_query,
&instance.entity_path,
*comp,
)
Copy link
Member

Choose a reason for hiding this comment

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

⚠️ Am I reading this right that this is redoing the full query for each and every instance? Also we've already queried the data at the start anyway (for all_instances).

All these get_component_instances queries should be done once at the start and put in a map, then everything can be done cheaply.

Copy link
Member Author

Choose a reason for hiding this comment

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

As per our discussion yesterday, this is acceptable because the inner table closure is called only for the displayed rows. I added a comment to that effect.

crates/re_space_view_dataframe/src/space_view_class.rs Outdated Show resolved Hide resolved
crates/re_space_view_dataframe/src/space_view_class.rs Outdated Show resolved Hide resolved
crates/re_space_view_dataframe/src/space_view_class.rs Outdated Show resolved Hide resolved
@abey79 abey79 merged commit 605a98a into main Dec 13, 2023
40 checks passed
@abey79 abey79 deleted the antoine/table-space-view branch December 13, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants