-
Notifications
You must be signed in to change notification settings - Fork 334
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
Generic component placeholders #7447
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Wumpf
changed the title
Andreas/automatic component placeholders
Generic component placeholders
Sep 19, 2024
Wumpf
force-pushed
the
andreas/automatic-component-placeholders
branch
from
October 4, 2024 15:17
f90a880
to
41ed32f
Compare
Wumpf
force-pushed
the
andreas/automatic-component-placeholders
branch
from
October 24, 2024 09:33
41ed32f
to
5696f01
Compare
Wumpf
added
the
exclude from changelog
PRs with this won't show up in CHANGELOG.md
label
Oct 24, 2024
Wumpf
force-pushed
the
andreas/automatic-component-placeholders
branch
from
October 24, 2024 13:09
5696f01
to
77b6ca6
Compare
6 tasks
abey79
approved these changes
Oct 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Comment on lines
+164
to
+173
/// Returns a placeholder value for a given component, solely identified by its name. | ||
/// | ||
/// A placeholder is an array of the component type with a single element which takes on some default value. | ||
/// It can be set as part of the reflection information, see [`re_types_core::reflection::ComponentReflection::custom_placeholder`]. | ||
/// Note that automatically generated placeholders ignore any extension types. | ||
/// | ||
/// This requires the component name to be known by either datastore or blueprint store and | ||
/// will return a placeholder for a nulltype otherwise, logging an error. | ||
/// The rationale is that to get into this situation, we need to know of a component name for which | ||
/// we don't have a datatype, meaning that we can't make any statement about what data this component should represent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice
Co-authored-by: Antoine Beyeler <49431240+abey79@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
exclude from changelog
PRs with this won't show up in CHANGELOG.md
🚜 refactor
Change the code, not the functionality
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
impl Default
#7439Introduces generic placeholders, allowing to..
Default
implementations in many casesMostly for testing I removed a few known strange defaults:
Blob
ImageData
ShowLabels
.. and tested that all fallback & default displays work fine afterwards. Seemed robust!
I'm not doing a sweep over existing components because that would imply a lot more testing for changed behavior would be necessary and I don't see a lot of value in that right now.
Wrinkles:
Checklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerCHANGELOG.md
and the migration guideTo run all checks from
main
, comment on the PR with@rerun-bot full-check
.