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

More context menu 6: Add "Expand/Collapse all" actions #5433

Merged
merged 3 commits into from Mar 11, 2024

Conversation

abey79
Copy link
Contributor

@abey79 abey79 commented Mar 8, 2024

What

What the title says ☝🏻

expand_collapse.mp4

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!

@abey79 abey79 added ui concerns graphical user interface include in changelog labels Mar 8, 2024
@Wumpf Wumpf self-requested a review March 8, 2024 12:10
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.

super nice!
The only thing I'm not happy about is how you keep piling in actions.rs. Why not create separate modules for each action, no harm in that?

Comment on lines +568 to +569
// TODO(ab): in an ideal world, we'd check the fully expended/collapsed state of the item to
// avoid showing a command that wouldn't have an effect but that's lots of added complexity.
Copy link
Member

Choose a reason for hiding this comment

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

yeah whatever, not a big issue I think

// avoid showing a command that wouldn't have an effect but that's lots of added complexity.
match item {
Item::StoreId(_) | Item::ComponentPath(_) => false,
Item::SpaceView(_) | Item::Container(_) | Item::InstancePath(_) => true,
Copy link
Member

Choose a reason for hiding this comment

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

~could we check if either of these are empty like we do with data result? πŸ€” ~

Right, spaceview and container are never empty. InstancePath might, you could check the global path tree for that, might get too involved quickly though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, containers can be empty, but they always have the triangle icon (which is kinda weird, if you think of it, but I guess more natural given that they are meant to contain something).

As for Instance paths, they are never empty, since they always have at least some components. When they show up in the blueprint tree, then they are DataResult and this case is properly handled.

@abey79
Copy link
Contributor Author

abey79 commented Mar 11, 2024

Why not create separate modules for each action, no harm in that?

I'll do that in the next/final PR in that series: split release checklist and actions.rs

@abey79 abey79 merged commit 7d656ec into main Mar 11, 2024
34 checks passed
@abey79 abey79 deleted the antoine/mcm6-collapse-expand-all branch March 11, 2024 08:45
@abey79 abey79 mentioned this pull request Mar 11, 2024
5 tasks
abey79 added a commit that referenced this pull request Mar 12, 2024
### What

NOTE: review commit by commit (first commit is pure refactoring).

Final PR in the series. This PR:
- split `actions.rs` into many sub-files
- fix capitalisation in some menu item
- split the release check list in small checks

Full series:
- #5392
- #5397
- #5407
- #5411
- #5422
- #5433
- #5456

### 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/5456/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5456/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/5456/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/5456)
- [Docs
preview](https://rerun.io/preview/a36360f586494f6648fdc4bbb9d806ab12911358/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/a36360f586494f6648fdc4bbb9d806ab12911358/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants