Skip to content

Player pane height is computed once and never adapts to the window #349

Description

@vishnuv688

Not mobile-specific — it is wrong for every trace, just least visible on a desktop one.

packages/app/src/components/workbench.ts has no resize handling at all: no connectedCallback, no listener. The player pane's height comes from a DragController whose initialPosition is a pixel number computed once, at construction, from whatever window was open at the time. Nothing ever recomputes it.

Measured by opening a trace in a small window and then resizing:

window pane height phone rendered
1280x720 124px 13x28
1600x1000 124px 13x28
2560x1440 124px 13x28

A 13px-wide capture on a 2560px screen. The snapshot component was faithfully filling the box it was given; the box never changed.

Two parts to a fix:

  1. Derive the default pane height from the window as it is now, and re-render on resize. A height the user has dragged is stored and must keep winning.
  2. The snapshot component listens for resize and window-drag, so re-fitting depends on whoever changed the layout remembering to announce it. A ResizeObserver on its own box covers every case, including those that fire no event (dock divider, sidebar collapse, browser zoom).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions