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

Don't allow "same-type" linear container children creation #5082

Closed
abey79 opened this issue Feb 7, 2024 · 0 comments · Fixed by #5091
Closed

Don't allow "same-type" linear container children creation #5082

abey79 opened this issue Feb 7, 2024 · 0 comments · Fixed by #5091
Labels
ui concerns graphical user interface
Milestone

Comments

@abey79
Copy link
Contributor

abey79 commented Feb 7, 2024

Nested linear containers are currently auto-merged, since it doesn't make any sense to have a, e.g., horizontal container directly inside another horizontal container. From a viewport perspective, this is strictly equivalent to a single horizontal container with all the children.

horizontal
└ A
└ horizontal
   └ B
   └ C

same as:

horizontal
└ A
└ B
└ C

This means that creating a Horizontal/Vertical container inside of a container of the same type, e.g. with the "Add SV/Container" modal, is a noop that is surprising to the user:

Export-1707301705100

==> The modal should disable "same-type-linear" container with a tooltip explaining why.

@abey79 abey79 added the ui concerns graphical user interface label Feb 7, 2024
@abey79 abey79 added this to the 0.13 milestone Feb 7, 2024
abey79 added a commit that referenced this issue Feb 7, 2024
abey79 added a commit that referenced this issue Feb 7, 2024
…rs with the same type (#5091)

### What

- Fixes #5082

*Note*: due to emilk/egui#3997, the tooltip
shows up immediately, which is slightly annoying.

<img width="1898" alt="image"
src="https://github.com/rerun-io/rerun/assets/49431240/ef64fa2f-7a5b-41f0-aec5-31b2e55c8efc">

<img width="681" alt="image"
src="https://github.com/rerun-io/rerun/assets/49431240/5ace80d5-eb49-4a1e-9440-6debb54d7d4f">


### 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/5091/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5091/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/5091/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](tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5091)
- [Docs
preview](https://rerun.io/preview/57a22b0a289369057acc1000af69df20df9e3d23/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/57a22b0a289369057acc1000af69df20df9e3d23/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
ui concerns graphical user interface
Projects
None yet
1 participant