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

Introduce a mechanism for blueprint-provided defaults #6537

Merged
merged 5 commits into from
Jun 11, 2024

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Jun 11, 2024

What

There's quite a bit of annoying logic in here related to when and how we figure out whether a component is actually empty, motivating: #6536

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
  • If applicable, add a new check to the release checklist!

To run all checks from main, comment on the PR with @rerun-bot full-check.

@jleibs jleibs added 🟦 blueprint The data that defines our UI include in changelog labels Jun 11, 2024
@jleibs jleibs marked this pull request as ready for review June 11, 2024 01:09
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.

awesome!

crates/re_space_view/src/query.rs Outdated Show resolved Hide resolved
Comment on lines +42 to +44
// TODO(jleibs): This doesn't work when the component set contains empty results.
// This means we over-query for defaults that will never be used.
// component_set.retain(|component| !results.components.contains_key(component));
Copy link
Member

Choose a reason for hiding this comment

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

on the bright side this means that this object contains more of what the ui may want to display 🤔
Would it be worth to poke results some more to reduce the query size? I reckon you made the call that it doesn't

@@ -0,0 +1,241 @@
use std::collections::{BTreeMap, BTreeSet};

Copy link
Member

Choose a reason for hiding this comment

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

quite a bit of unfortunate copy & paste in here from component override ui, but probably better than the work intensive alternative with dubious future outlook 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

That was my thought -- I think they both get thrown away and replaced with something universal.

@jleibs jleibs merged commit 3695925 into main Jun 11, 2024
34 checks passed
@jleibs jleibs deleted the jleibs/blueprint_defaults branch June 11, 2024 18:43
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 include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants