-
Notifications
You must be signed in to change notification settings - Fork 376
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
Make whether labels are shown a configurable property #3465
Comments
Related to |
…abel now at the center (#6741) ### What Previously, single labels would splat out, quickly hitting the "can't display more labels" limit (described in #3465). Now, there's a special meaning for a single labels: Instead of splatting it across all instances, we place the single label at the center. This is particularly useful with in-viewer overrides, as it allows to set labels on objects with many instances. ![image](https://github.com/rerun-io/rerun/assets/1220815/a4e2462f-3fee-4cca-a4bd-d05cff263621) A drawback of bounding box based placement is that the label moves with the box. But I reckon it's a lot better than the alternative. https://github.com/rerun-io/rerun/assets/1220815/866058a4-8edf-4ce7-9cd5-63f8b00e34a3 * Part of #6595 ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6741?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/6741?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! - [PR Build Summary](https://build.rerun.io/pr/6741) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
Adding a bit of context since this comes up more and more often now: I propose to introduce a |
This sounds great -- let's do it. |
Maybe something for @kpreid |
### What * Combine code of `process_labels_3d` and `process_labels_2d` into one core function, `process_labels`. * Move all copies of the code deciding how many labels to show into `process_labels`. This is a (hopefully) pure refactoring which removes duplicate code and should also make #3465 easier to implement. ### Checklist * [X] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [X] I've included a screenshot or gif (if applicable) * [ ] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7208?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7208?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [X] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [X] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [X] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7208) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
…are shown. (#7249) * Implements #3465 ### What * Each archetype which has labels gets a `ShowLabels` non-repeated component. (I figured having it set per-instance would be hardly ever useful.) * Visualizers pass this component to `process_labels()`. * `process_labels()` uses it to override the existing “show labels if less than 30” policy. * Refactoring: `process_labels()` and friends now take a struct instead of 8 separate parameters. This makes the callsites more legible and maintainable, and might eventually be useful for further refinement of the label rendering system (it's basically a "ComponentData" struct for labels). One element is currently missing: the automatic policy is not expressed as a component fallback. That means that the viewer UI does not know about it and won't display the real fallback value, but a bogus constant `true`. Other than that, it should be fully ready to go, so feel free to either merge or wait for that further work as you see fit. ### Checklist * [X] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [X] I've included a screenshot or gif (if applicable) * [ ] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7249?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7249?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [X] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [X] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [X] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7249) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`. --------- Co-authored-by: Emil Ernerfeldt <[email protected]>
…#7266) ### What * Followup to #7249 * Fixes #3465 The default value for the `ShowLabels` component now passes through `ComponentFallbackProvider`, so the viewer UI will properly show the fallback value derived from the number of instances. Further possible work in this area would be to define “number of instances” as something that can be generically fetched based on an archetype, rather than requiring each visualizer to communicate how it counts that. ### Checklist * [X] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [X] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7266?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7266?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [X] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [X] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [X] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7266) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
We currently have hard-coded threshold of 30 labels for whether to show labels.
These values should just govern a threshold, but whether we show labels our not should be configurable via the UI.
The text was updated successfully, but these errors were encountered: