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

Better auto-layout of space-views #2139

Closed
Tracked by #2276
emilk opened this issue May 16, 2023 · 0 comments · Fixed by #2558
Closed
Tracked by #2276

Better auto-layout of space-views #2139

emilk opened this issue May 16, 2023 · 0 comments · Fixed by #2558
Labels
enhancement New feature or request 📺 re_viewer affects re_viewer itself ui concerns graphical user interface

Comments

@emilk
Copy link
Member

emilk commented May 16, 2023

use the egui_tiles::Grid auto-layout feature in crates/re_viewer/src/ui/space_view_heuristics.rs

@emilk emilk added enhancement New feature or request ui concerns graphical user interface 📺 re_viewer affects re_viewer itself labels May 16, 2023
emilk added a commit that referenced this issue Jun 29, 2023
Closes #2139

### What
This simplifies the auto-layout of space views.

We make heavy use of `egui_tiles::Grid`, which is responsive to the
current viewport size. This means that space views may move around as
you resize window in an effort to keep each one square-ish. In the
future we can make `egui_tiles` smarter here and inform it of the
desired aspect ratio of each space view.

We make an exception for the (common) case of exactly three space views,
which doesn't fit nicely in a grid anyways.



### 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 https://demo.rerun.io/pr/2558 

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2558

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/e2ed87c/docs
Examples preview: https://rerun.io/preview/e2ed87c/examples
<!-- pr-link-docs:end -->


### Testing
In order to test this I used the `run_all.py` script and found a bunch
of issues with is, so I fixed them.


![image](https://github.com/rerun-io/rerun/assets/1148717/af84bbde-7828-45f5-ab31-df20b3f099df)


![image](https://github.com/rerun-io/rerun/assets/1148717/d845a3b6-3c4d-4a2c-8317-90d35a1a423d)


![image](https://github.com/rerun-io/rerun/assets/1148717/c4005fd2-00c4-44bb-a120-f114f4e2bff8)


![image](https://github.com/rerun-io/rerun/assets/1148717/9844c977-d7a1-49a1-8255-e659288991ee)


![image](https://github.com/rerun-io/rerun/assets/1148717/6546b29f-2107-4713-bfe2-be1efd2cae1e)


![image](https://github.com/rerun-io/rerun/assets/1148717/05353922-02fb-4293-89c7-6b8372240e2b)
emilk added a commit that referenced this issue Jun 29, 2023
Closes #2139

### What
This simplifies the auto-layout of space views.

We make heavy use of `egui_tiles::Grid`, which is responsive to the
current viewport size. This means that space views may move around as
you resize window in an effort to keep each one square-ish. In the
future we can make `egui_tiles` smarter here and inform it of the
desired aspect ratio of each space view.

We make an exception for the (common) case of exactly three space views,
which doesn't fit nicely in a grid anyways.



### 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 https://demo.rerun.io/pr/2558 

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2558

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/e2ed87c/docs
Examples preview: https://rerun.io/preview/e2ed87c/examples
<!-- pr-link-docs:end -->


### Testing
In order to test this I used the `run_all.py` script and found a bunch
of issues with is, so I fixed them.


![image](https://github.com/rerun-io/rerun/assets/1148717/af84bbde-7828-45f5-ab31-df20b3f099df)


![image](https://github.com/rerun-io/rerun/assets/1148717/d845a3b6-3c4d-4a2c-8317-90d35a1a423d)


![image](https://github.com/rerun-io/rerun/assets/1148717/c4005fd2-00c4-44bb-a120-f114f4e2bff8)


![image](https://github.com/rerun-io/rerun/assets/1148717/9844c977-d7a1-49a1-8255-e659288991ee)


![image](https://github.com/rerun-io/rerun/assets/1148717/6546b29f-2107-4713-bfe2-be1efd2cae1e)


![image](https://github.com/rerun-io/rerun/assets/1148717/05353922-02fb-4293-89c7-6b8372240e2b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 📺 re_viewer affects re_viewer itself ui concerns graphical user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant