-
Notifications
You must be signed in to change notification settings - Fork 363
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
Allow hiding top panel via blueprint #6409
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't actually work ;)
Bunch of things we need to do:
- process the incoming
TopPanel
- extend docs:
- what does collapsed vs hidden mean on each of the panels
- what does collapse_all thingy bool actually do now
- ... stuff?
How I tested:
pixi run python ./docs/snippets/all/views/spatial2d.py
pixi run ipython
then
import rerun.blueprint as rrb
rrb.Blueprint(rrb.TopPanel(state="collapsed")).connect("rerun_example_spatial_2d")
crates/re_viewer/src/app.rs
Outdated
@@ -884,7 +884,7 @@ impl App { | |||
|
|||
crate::ui::mobile_warning_ui(&self.re_ui, ui); | |||
|
|||
if app_blueprint.top_panel_state != PanelState::Hidden { | |||
if app_blueprint.top_panel_state == PanelState::Expanded { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is to align with behavior in #6419
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On native mac the hidden top panel doesn't work out, I think we have to do a per-platform thing here
I figure on Windows and Linux this is fine because we don't mange the close buttons there. Also, for web this is obviously a good feature to have (maybe actually worth pointing out in the doc that this is useful for web mostly).
I'd propose to disable this on Mac (needs to be documented) and makes sure this looks alright on Windows & Linux.
Co-authored-by: Andreas Reich <[email protected]>
Co-authored-by: Andreas Reich <[email protected]>
Instead of disabling it, I made the top panel toggle hide its content instead of the full thing on mac. Currently making sure it looks alright everywhere:
|
good idea! Confirmed on my side this looks alright on Mac |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first I thought "fully hides the panel" isn't quite right on Mac now, but arguably it still is as we only have the bare minimum title bar that the OS needs essentially (we could shrink it a bit down with only having the mac buttons in there but whatever, can do that later if we really want to optimize this), so let's keep things simple just as your PR suggests
Great stuff and thanks for all the followups!
What
rrb.TopPanel
is now exposed, works similarly torrb.TimePanel
TimePanel
hidden state now fully hides the time panelChecklist
main
build: rerun.io/viewernightly
build: rerun.io/viewerTo run all checks from
main
, comment on the PR with@rerun-bot full-check
.