Skip to content

Size the name and detail columns from what is drawn in them - #38

Merged
SimonCropp merged 14 commits into
mainfrom
fix-group-name-truncation
Oct 4, 2026
Merged

SimonCropp merged 14 commits into
mainfrom
fix-group-name-truncation

Conversation

@SimonCropp

@SimonCropp SimonCropp commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Started from one bug: on the Windows head the widest group name was cut short with an ellipsis beside an empty column. The cause was the column being sized by one measure and drawn by another, and the same fault turned up in the detail column, the text renderer and both native heads. Each column is now sized from what is drawn in it.

Name column

  • A group was measured as one text (arrow and name together) and drawn as two, each with its own padding, so the widest group's name was a padding short. The arrow and the name are now measured apart on every head, and the name starts a fixed indent after the arrow, so it does not move as the group opens.
  • On the Windows head NameCell gives the parts of a name's cell for a row kind; ColumnWidths sums them and DrawName advances by them.

Detail column

  • On the Windows head DetailOffset places each run and sizes the column, measured with the flags the runs are drawn with. This fixes runs being placed by a measure that read an ampersand as a mnemonic, which drew the branch of a pipeline named 'Build & Test' ten pixels over the end of it.
  • The Windows column was sized with text padding the runs never drew. That slack is gone, so while the chips are giving way everything after the detail sits nine pixels further left.
  • On the Linux head a table column asked to be no width still takes the table's minimum. The hidden bar's column and an empty author column were left out of the sums and took that from the detail, so the widest detail lost its last letter. They are now counted.

Each cell sized as its row draws it

  • BuildsPage gains three optional lists (the names that are a member's, the groups that carry a mark, the details that carry the branch's mark) and three flags for whether any row of the page, in view or not, has a mark before its name, a mark leading its detail, or a provider.
  • Every head and the text renderer size a build's name without a member's indent, a group without a mark it does not have, and a detail without a branch mark it does not carry, and reserve room for the marks from the flags rather than from the rows in view, so columns do not move while scrolling.
  • This drops the old reservation of an indent on every name: opening a prefix group can now widen the name column if an indented member name is the widest.

Native interface: BmScreen carries the new lists and flags, BM_VERSION 20. The binaries are rebuilt by build-native and merged into this branch (#39, then #40 for the Linux detail fix), so source, binaries and baselines match.

Tests

  • RowsCanvasTests (Windows head, not Debug-only, no pixel baselines): TheWidestGroupNameIsDrawnInFull, ARunWithAnAmpersandIsMeasuredAsItIsDrawn, TheWidestDetailIsDrawnInFullWhileTheChipsGiveWay, AGroupOnThePageDoesNotIndentTheBuilds, ARowKeepsItsPlaceWhenTheRowsWithMarksAreOutOfView. The first two fail against the old code; the third fails if the column is sized three pixels short.
  • Native PixelTests: two new captures, Groups and PrefixGroup, on Linux and macOS. No native baseline showed a group before.

Baselines changed

  • Windows: Groups, Searched, PrefixGroup, Narrow.
  • Text renderer: 13 ScreenTests snapshots and the inline Scrolled one, the name column four characters narrower on a page with a group.
  • Linux: Builds, Lanes, LocalRepos, plus the two new captures. macOS: only the two new captures.
  • Struct layout and two payload snapshots, for the new fields.

Not checked against a live list on any head.

The name column measured a group as one string, arrow and name together, but DrawName draws them as two texts, each with its own padding, so the widest group's name was a padding short and drew an ellipsis. Measure them apart, and advance by the same indent whether the group is open or closed.
Reads the name's link, which is as wide as what was drawn of it, against the name's measured width, so it holds whatever fonts the machine has and runs in Release where the pixel baselines do not. Fails against the column sizing before the fix, 159 against 167.
NameCell gives the indent, the mark and the name's width for a row kind. ColumnWidths sums them and DrawName advances by them, where each worked the cell out for itself and the two came apart. No change to what is drawn.
DetailOffset gives how far into its cell a detail has got after some of its text and marks. ColumnWidths sizes the column from where that ends each detail and DrawDetail starts each run at it, both measuring with the flags the runs are drawn with.

Two things change. The column loses the padding it was sized with and the runs never drew, so while the chips are giving way everything after the detail sits nine pixels further left, which is the Narrow baseline. And a run is no longer measured with an ampersand read as a mnemonic, which drew the branch of a pipeline named 'Build & Test' over the end of it.
@SimonCropp SimonCropp changed the title Stop the widest group name being cut short Size the name and detail columns from what is drawn in them Oct 3, 2026
SimonCropp and others added 10 commits October 4, 2026 08:34
The page gave the names and details as text alone, so the Windows head sized every name as a member's, indented and with a mark, and every detail as carrying the branch's mark. The page now also says which names are a member's, which groups carry a mark and which details carry the branch's, and the columns are sized from each cell as it is drawn.

A build's name no longer gets an indent no row drew in, so on a page with a group the second cell starts 26 pixels further left: the Groups, Searched and PrefixGroup baselines. The new lists are additions to BuildsPage; the native heads and the text renderer read what they did.
…rks from every row

The text renderer indented every name wherever the page had a group, and added the branch's mark to every detail once a row in view had one. It now sizes each name and detail as the kind of row that shows it, from the lists the page gained for the Windows head, so the name column is four characters narrower on a page with a group.

Whether room is kept for the mark before a name, the mark leading the second cell and the provider was read from the rows in view, so the columns moved as a row with one scrolled in or out. The page now says it of every row, and the Windows head and the text renderer read that.
The Linux and macOS heads sized every name as a member's, indented, and every detail as carrying the branch's mark, and read whether to keep room for the marks from the rows in view. BmScreen now carries the member names, the marked group names and the marked details after the lists it had, and whether any row of the page has each mark, and both heads size from those. BM_VERSION 20.

The macOS head also measures a group's arrow and name apart and advances past the arrow by the indent, as the Windows head does. Not compiled here: the build-native workflow builds the binaries, and the pixel baselines follow from a Test run.
The column was sized from the one text 'v name', with a letter the row does not draw, and the name started where whichever arrow was drawn ended. The indent is now the open arrow's width, a group's name is measured apart from it, and every group's name is drawn the indent after the arrow, as the other heads do. Not compiled here.
Co-authored-by: SimonCropp <122666+SimonCropp@users.noreply.github.com>
None of the native pixel baselines showed a group, so nothing drew how the Linux and macOS heads size and place one: a closed group with a mark, and an open prefix group with its members indented. The baselines follow from the received artifacts of the Build run.
From the received artifacts of the Build run on 2494dc0.
A table column asked to be no width is still given the minimum, the frame padding. The hidden bar's column and an author column with no one to name were left out of the sums, so they took that much from the detail column, the one that stretches, and the widest detail was cut short. Not compiled here, and the cause is read from the code rather than measured: the Linux baselines will show whether it holds.
From the received artifacts of the Build run on 8c732ec: the widest detail is drawn in full, and the columns after it sit eight pixels further right where the bar is hidden.
Co-authored-by: SimonCropp <122666+SimonCropp@users.noreply.github.com>
@SimonCropp
SimonCropp merged commit 02260cb into main Oct 4, 2026
13 checks passed
@SimonCropp
SimonCropp deleted the fix-group-name-truncation branch October 4, 2026 05:25
@SimonCropp SimonCropp added this to the 1.0.1 milestone Oct 4, 2026
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.

1 participant