-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More context menu 6: Add "Expand/Collapse all" actions (#5433)
### What What the title says ☝🏻 https://github.com/rerun-io/rerun/assets/49431240/a5dcd8c4-a05c-4159-a854-0ebec52a34a2 ### 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 newly built examples: [app.rerun.io](https://app.rerun.io/pr/5433/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/5433/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/5433/index.html?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/5433) - [Docs preview](https://rerun.io/preview/c276bcecb906512bfabf6eb41be63ba433731ff8/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/c276bcecb906512bfabf6eb41be63ba433731ff8/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
- Loading branch information
Showing
3 changed files
with
185 additions
and
2 deletions.
There are no files selected for viewing
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
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
57 changes: 57 additions & 0 deletions
57
tests/python/release_checklist/check_context_menu_collapse_expand_all.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
from __future__ import annotations | ||
|
||
import os | ||
from argparse import Namespace | ||
from uuid import uuid4 | ||
|
||
import rerun as rr | ||
|
||
README = """ | ||
# Context Menu - Add entity to new space view | ||
## Blueprint tree | ||
* Reset the blueprint. | ||
* Right-click on Viewport and select "Collapse all". Check everything is collapsed by manually expending everything. | ||
* Right-click on Viewport and select "Collapse all" and then "Expend all". Check everything is expanded. | ||
## Streams tree | ||
* Same as above, with the `world/` entity. | ||
## Multi-selection | ||
* Same as above, with both the viewport (blueprint tree) and `world/` (streams tree) selected. | ||
""" | ||
|
||
|
||
def log_readme() -> None: | ||
rr.log("readme", rr.TextDocument(README, media_type=rr.MediaType.MARKDOWN), timeless=True) | ||
|
||
|
||
def log_some_space_views() -> None: | ||
# TODO(ab): add a deep-ish container hierarchy blueprint for more collapse/expand fun | ||
|
||
rr.set_time_sequence("frame_nr", 0) | ||
|
||
rr.log("/", rr.Boxes3D(centers=[0, 0, 0], half_sizes=[1, 1, 1])) | ||
rr.log("/world/robot/arm/actuator/thing", rr.Boxes3D(centers=[0.5, 0, 0], half_sizes=[0.1, 0.1, 0.1])) | ||
|
||
|
||
def run(args: Namespace) -> None: | ||
# TODO(cmc): I have no idea why this works without specifying a `recording_id`, but | ||
# I'm not gonna rely on it anyway. | ||
rr.script_setup(args, f"{os.path.basename(__file__)}", recording_id=uuid4()) | ||
|
||
log_readme() | ||
log_some_space_views() | ||
|
||
|
||
if __name__ == "__main__": | ||
import argparse | ||
|
||
parser = argparse.ArgumentParser(description="Interactive release checklist") | ||
rr.script_add_args(parser) | ||
args = parser.parse_args() | ||
run(args) |