Skip to content

Panel toggle buttons should not be disabled when panel state overrides are set #12762

@gavrelina

Description

@gavrelina

Problem

When the web viewer is embedded (e.g. arkit), the host page calls override_panel_state() to hide panels for a clean initial look in the context of web. This correctly hides the panels, but also disables the toggle buttons — making it impossible for users to open them without entering fullscreen first.

The override API conflates two concerns:

  1. Setting the panel's visible state (intended)
  2. Disabling user interaction with the toggle button (unintended)

Root cause

In top_panel.rs, the panel toggle buttons use *_overridden() as a disable condition (for all three panels):

ui.add_enabled_ui(                                                                          
      route.has_selection_panel() && !app_blueprint.selection_panel_overridden(),
      ...                                                                                     
  ); 

When an override exists, the button is grayed out, the toggle action is also blocked through hot keys.

Proposed fix after chatting to claude

  • top_panel.rs: Remove !app_blueprint.*_panel_overridden() from the three add_enabled_ui conditions
  • app_blueprint.rs: Remove the early returns in toggle_*_panel() so clicking the button works, and toggle from the effective state (self.*_panel_state()) rather than the blueprint store value (self.panel_states.*)
  • Clear the override for that panel on toggle so it doesn't fight back on the next frame (?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request👀 needs triageThis issue needs to be triaged by the Rerun team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions