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

Update GraphEdge visualizer to use sliced struct fields #8555

Open
wants to merge 2 commits into
base: cmc/sliced_visualizers
Choose a base branch
from

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Dec 20, 2024

@teh-cmc teh-cmc added 📺 re_viewer affects re_viewer itself 🚜 refactor Change the code, not the functionality exclude from changelog PRs with this won't show up in CHANGELOG.md labels Dec 20, 2024
Copy link

github-actions bot commented Dec 20, 2024

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
edfc60d https://rerun.io/viewer/pr/8555 +nightly +main

Note: This comment is updated whenever you push a commit.

@teh-cmc teh-cmc added the do-not-merge Do not merge this PR label Dec 20, 2024
Comment on lines 51 to 58
// TODO(cmc): could we (improve and then) use reflection for this?
re_types::static_assert_struct_has_fields!(
datatypes::Utf8Pair,
first: datatypes::Utf8,
second: datatypes::Utf8,
);
let source: ArchetypeFieldName = "first".into();
let target: ArchetypeFieldName = "second".into();
Copy link
Member Author

Choose a reason for hiding this comment

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

There are a million possible ways to "improve" this. Whether it's via reflection, or codegen, or whatever else.

For now, I very much like the fact that this is so dumb and so low-tech.

We can make it more complex/automated when the need arises.

Copy link
Member Author

Choose a reason for hiding this comment

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

I need to get rid of the ArchetypeFieldName though, that's not needed anymore.

@teh-cmc teh-cmc marked this pull request as ready for review December 20, 2024 11:23
Copy link
Contributor

@grtlr grtlr left a comment

Choose a reason for hiding this comment

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

Very nice! 🤩

@teh-cmc teh-cmc force-pushed the cmc/sliced_visualizers branch from 92a0bce to 7bb905f Compare December 20, 2024 13:20
@teh-cmc teh-cmc force-pushed the cmc/graphedge_struct_slice branch from a757399 to edfc60d Compare December 20, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge Do not merge this PR exclude from changelog PRs with this won't show up in CHANGELOG.md 📺 re_viewer affects re_viewer itself 🚜 refactor Change the code, not the functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants