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

Allow SpaceViews to customize the behavior for how default visualizers are chosen #5050

Merged
merged 4 commits into from
Feb 6, 2024

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Feb 5, 2024

What

We don't want to use Scalar as the indicator for LineSeries or PointSeries or else we would get both any time a user logs a Scalar. Instead we now delegate this choice to the space-view.

Additionally, entities are now always included in the query-results if they are visualizable, even if they aren't indicated. Without this there is no way to access the query-result in order to override its visualizers if necessary.

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):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@jleibs jleibs added 🟦 blueprint The data that defines our UI 📺 re_viewer affects re_viewer itself exclude from changelog PRs with this won't show up in CHANGELOG.md labels Feb 5, 2024
@jleibs jleibs changed the base branch from main to jleibs/move_space_view_blueprint February 5, 2024 21:33
@jleibs jleibs marked this pull request as ready for review February 5, 2024 21:33
@jleibs jleibs force-pushed the jleibs/space_view_visualizer_determination branch from a44e34e to bff6e98 Compare February 5, 2024 21:47
@jleibs jleibs changed the title Allow SpaceViews to customize tthe behavior for how default visualizers are chosen Allow SpaceViews to customize the behavior for how default visualizers are chosen Feb 6, 2024
@Wumpf
Copy link
Member

Wumpf commented Feb 6, 2024

nice. if we'd now enable visualizer overrides we could solve

image

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

perfect! love it when a plan works out as well as this!

Comment on lines +168 to +175
// Because SeriesLine is our fallback visualizer, also include any entities for which
// SeriesLine is applicable, even if not indicated.
if let Some(applicable) = ctx
.applicable_entities_per_visualizer
.get(&SeriesLineSystem::identifier())
{
indicated_entities.0.extend(applicable.iter().cloned());
}
Copy link
Member

Choose a reason for hiding this comment

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

ah great catch! At first I thought a different mechanism needs to do this, but I think that's spot on!

Comment on lines +255 to +259
// If there were no other visualizers, but the SeriesLineSystem is available, use it.
if visualizers.is_empty() && available_visualizers.contains(&SeriesLineSystem::identifier())
{
visualizers.insert(0, SeriesLineSystem::identifier());
}
Copy link
Member

Choose a reason for hiding this comment

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

unfortunate that we can't just call into the base for the rest (don't see how either). But otherwise perfect, just as planned!

Base automatically changed from jleibs/move_space_view_blueprint to main February 6, 2024 09:53
@Wumpf Wumpf force-pushed the jleibs/space_view_visualizer_determination branch from bff6e98 to 49e3cd9 Compare February 6, 2024 09:56
@Wumpf Wumpf merged commit c73f9f6 into main Feb 6, 2024
40 checks passed
@Wumpf Wumpf deleted the jleibs/space_view_visualizer_determination branch February 6, 2024 10:15
teh-cmc added a commit that referenced this pull request Feb 6, 2024
…ad (#5042)

### What

Also fixes missing serialization of `StrokeWidth` & `MarkerSize`


![image](https://github.com/rerun-io/rerun/assets/1220815/44a118d4-5dc7-4c6d-a79b-29f83ac7eb77)


blocked by a few things:
* [x] text labels should go on SeriesLine/SeriesPlot  #5043
* [x] SeriesPoint doesn't have a `MarkerSize` component yet #5057
* [x] Need to fix heuristic for only having Scalar -> Line #5050

---------

Co-authored-by: Clement Rey <[email protected]>
@emilk emilk mentioned this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🟦 blueprint The data that defines our UI exclude from changelog PRs with this won't show up in CHANGELOG.md 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants