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

Reset individual blueprint properties to what was logged #6150

Closed
emilk opened this issue Apr 29, 2024 · 1 comment · Fixed by #6127
Closed

Reset individual blueprint properties to what was logged #6150

emilk opened this issue Apr 29, 2024 · 1 comment · Fixed by #6127
Assignees
Labels
🟦 blueprint The data that defines our UI ui concerns graphical user interface

Comments

@emilk
Copy link
Member

emilk commented Apr 29, 2024

We already have a way to reset the entire active blueprint to the default one set in code.
What we need is to do the same for individual properties.

For instance, when resetting the 2D view bounds, we should reset to whatever was set in code.

Implementation

The active blueprint is a clone of the default blueprint, with new values appended to it.
This means we can implement this is one out of a few different ways:

A) Read the value from the default blueprint and append it to the active one
B) Remove the value in the active blueprint, and then copy the full history of the value from the default blueprint

B) requires something like #1329 to be implemented.

@emilk emilk added ui concerns graphical user interface 🟦 blueprint The data that defines our UI labels Apr 29, 2024
@emilk emilk self-assigned this Apr 29, 2024
@emilk
Copy link
Member Author

emilk commented Apr 29, 2024

I'm going with option A) in #6127

emilk added a commit that referenced this issue Apr 29, 2024
### What
* Closes #683
* Closes #6150

Usage:
```py
rrb.Spatial2DView(visual_bounds=rrb.VisualBounds(min=[0.0, 0.0], max=[10.0, 20.0]))
```


### 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/6127?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/6127?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/6127)
- [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: Andreas Reich <r_andreas2@web.de>
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 ui concerns graphical user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant