"Align SortableTable row and header selection checkboxes" by Cody Jackson, fixes issue 19918. Reviewed 2026-11-24 with Pass B only. My first review asked for changes on 9a384b4; Cody answered both comments with 1de5275. Nothing from this run is posted.
Preview: https://rancherpr19960r.mf-created-dashboard.ui.rancher.space/dashboard/, built from 1de5275, backend the mf Rancher (v2.16.0-7758e3e-head). Saving there really writes to mf.
| Run | What blocks | Result |
|---|---|---|
| 1, strict (9a384b4) | A test that does not guard the fix, and any list that gets worse | Request changes |
| 2, less strict (1de5275), this one | Only something a user sees go wrong, or a fix that does not hold | Approve |
| 2, read with the strict rules of run 1 | As run 1 | Approve, with the nit |
On the PR preview itself, with real data and nothing saved. Log in to Rancher there first. Every comment below links to its steps, and each step links back here.
▶ What the PR changes (7 steps)▶ Review comments (7 steps)This also passes with the fix undone. On master, the Pods list at 1280x720 measures 0.41px horizontally and 0.45px vertically (0.5px and 0.45px at 1920x1080), inside the 0.5px and 1px allowed here. The check column leaves 15px for a 14px box, so centring can't move it more than 0.5px.
The unit tests only look at
align. With all the new CSS removed and the 12px back, they still pass and so do these two assertions, so nothing would catch the bug coming back.
Tightened the horizontal and vertical tolerances so the test fails without the fix, and added a vertical centering check for the header checkbox.
Yes for the limits and the numbers. The last clause was too strong: a full revert puts align="middle" back, and the unit tests do fail on that. What nothing caught was the CSS half.
| Page | Header box to its cell (≤ 0.5) | Row box to header box (≤ 0.1) | Row box to badge (≤ 0.2) | The test |
|---|---|---|---|---|
| Master, 054adb2 | 1.80 | 0.41 | 0.45 | Fails |
| PR as built | 0.26 | 0 | 0 | Passes |
| PR, only the centred cell back | 0.26 | 0.41 | 0 | Fails |
| PR, only the 12px back | 0.26 | 0 | 2.00 | Fails |
| PR, row checkbox not flex | 0.26 | 0 | 1.55 | Fails |
| PR, header checkbox not flex | 1.80 | 0 | 0 | Fails |
| PR, all new CSS removed | 1.80 | 0 | 0.45 | Fails |
| PR, whole fix removed | 1.80 | 0.41 | 0.45 | Fails |
With and without extensions. Master also fails and the PR as built also passes at 1440x900 and 1920x1080, with all 100 rows on it at 0. The other rows were run at 1280x720, the size the spec uses. In CI the spec passes on this commit.
▶ See what the test measures▶ See the fix undone, part by partThis rule is global, so it also reaches the tables that extensions bundle. With the Harvester 1.8.2 or 1.9.0 extension, open Pods and then go to the Harvester Virtual Machines list: the row checkboxes sit 2.5px above the state badge, against 0.5px on master. That is more than the offset this PR fixes.
Loading the Virtual Machines list directly is fine, because the dashboard's table styles aren't loaded yet. So the same list looks different depending on where you came from. Those extensions were built before PR 19144, and their checkbox is still 19px tall.
Moved the row checkbox styling into the scoped style block so it only applies to the dashboard table and leaves extension-bundled tables untouched.
Yes. With the old global rule put back on the new build, the 2.5px comes back. Without it, the list is the same as on master.
| Extension and path | Master | 9a384b4 | 1de5275 |
|---|---|---|---|
| Harvester 1.9.0, Pods first | 0.5px above | 2.5px above | 0.5px above |
| Harvester 1.8.2, Pods first | 0.5px above | 2.5px above | 0.5px above |
| Harvester 1.9.0, opened directly | - | 0.5px above | 0.5px above |
| Harvester 1.10.0-dev.7 (installed), Pods first | 0.5px below | 0 | 0.5px below |
Images, Volumes and Hosts are the same as on master too. Lists in newer extensions keep master's 0.5px until they are built with a shell that has this fix.
▶ See the live extension table▶ See before and nowEvery td of the table already has 8px at the top, so this line reads like a leftover. It is needed because extensions with an older table bring .sortable-table td.row-check with 12px. Only the PR description says so.
| Pods list | With the line | Without it |
|---|---|---|
| Extensions blocked | 0 from the badge | 0 from the badge |
| Extensions loaded (Harvester 1.10.0-dev.7 and Configurable Views 0.1.0 bring the 12px) | 0 from the badge | 2px below the badge |
So someone tidying it up sees no change on a plain dashboard, and the test's arithmetic still passes there. I dropped this nit on the first run because it sat on the same line as comment 2. The line is still there, so it stands on its own now.
▶ See the 8px line| What | Master | 1de5275 |
|---|---|---|
| Row box to header box | 0 to 0.5px | 0 on all 11 lists |
| Row box to the State badge | 0.5px | 0 on all lists with a badge |
| Header box to its label | 1.4px above | 0.2px |
| Header box on Clusters (two-line header) | 1px above | 1px above, unchanged |
| Header row height | 33.6px | 33px |
| Row heights | same | same |
| After going to an extension list and back | 0.5px | 0 |
| Dark theme at 1920x1080 | 0 and 0 on all 11 lists | |
| Click, shift and click, select all, cell click, Space, Enter | same | same |
| Focus ring | solid 2px, offset 2px | same |
| Unit tests in shell/components/SortableTable | 91 of 91 pass | |
| ESLint on the five files | clean |
Thanks Cody, both points are fixed for me. One optional nit inline.
Confirmed on 1de5275. The three measurements fail on master, and they fail when any one part of the fix is undone.
Confirmed on 1de5275 with Harvester 1.8.2 and 1.9.0: after Pods, the row checkboxes are 0.5px from the badge again, as on master.
Nit, optional: this reads as redundant, because every `td` already has 8px. It is needed because extensions with an older table bring `.sortable-table td.row-check` with 12px, but only the PR description says so. Without this line the row checkboxes sit 2px below the badge while such an extension is loaded, and nothing changes on a plain dashboard.
054adb2, the commit the branch starts from. It was not rebuilt: the one commit on master since then changes no table, checkbox or style file.