Skip to content

ui: make the track name column resizable - #175

Merged
cdamus merged 2 commits into
sokatoafrom
feature/5587-resize-track-header
Jul 31, 2026
Merged

cdamus merged 2 commits into
sokatoafrom
feature/5587-resize-track-header

Conversation

@cdamus

@cdamus cdamus commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Out of the box, many track names are too long for the column that shows them and are truncated to a common prefix, which can leave tracks hard to tell apart. Reading a name meant hovering over it, one track at a time.

The column can now be resized by dragging the divider between the track names and the timeline, which spans the ruler and all of the tracks. Double clicking the divider fits the column to the names of the tracks on screen; commands do the same and set an exact width, for reproducible setups. Resizing is clamped so that the column always has room for its buttons and can never squash the timeline away.

The width belongs to the workspace, because it is the tracks a workspace shows that determine how much room their names need, so each workspace remembers its own and embedders that persist workspaces persist it along with them. The width is also scoped to each timeline rather than to the UI as a whole, so a host showing several traces at once gives each of them its own column width, both in layout and in what is drawn on the canvas.

Fitting measures the full name of each track against the room its title has, so a single fit is enough even for the titles with the least room to spare, such as those of indented tracks and tracks carrying chips.

Covered by unit tests for the width of a workspace and how it is fitted, and by Playwright tests for dragging, fitting, setting an exact width and switching between workspaces.

For android-graphics/sokatoa#5587

Out of the box, many track names are too long for the column that shows
them and are truncated to a common prefix, which can leave tracks hard
to tell apart. Reading a name meant hovering over it, one track at a
time.

The column can now be resized by dragging the divider between the track
names and the timeline, which spans the ruler and all of the tracks.
Double clicking the divider fits the column to the names of the tracks
on screen; commands do the same and set an exact width, for reproducible
setups. Resizing is clamped so that the column always has room for its
buttons and can never squash the timeline away.

The width belongs to the workspace, because it is the tracks a workspace
shows that determine how much room their names need, so each workspace
remembers its own and embedders that persist workspaces persist it along
with them. The width is also scoped to each timeline rather than to the
UI as a whole, so a host showing several traces at once gives each of
them its own column width, both in layout and in what is drawn on the
canvas.

Fitting measures the full name of each track against the room its title
has, so a single fit is enough even for the titles with the least room
to spare, such as those of indented tracks and tracks carrying chips.

Covered by unit tests for the width of a workspace and how it is fitted,
and by Playwright tests for dragging, fitting, setting an exact width
and switching between workspaces.

For sarc-acl/sokatoa-internal#5587

Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
@cdamus
cdamus requested a review from ALevansSamsung July 30, 2026 15:06
When the mouse pointer overshoots expansion of the track shell because
it stops at the limit, don't pick up the pointer again for tracking the
drag handle until the pointer returns to the handle.

Signed-off-by: Christian W. Damus <cdamus@eclipsesource.com>
@cdamus
cdamus merged commit bed0c2a into sokatoa Jul 31, 2026
1 check passed
@cdamus
cdamus deleted the feature/5587-resize-track-header branch July 31, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants