Skip to content

pin data viewer cell line-height so rows render at row-height everywhere - #18396

Merged
kevinushey merged 1 commit into
mainfrom
bugfix/18378-data-viewer-row-height
Jul 30, 2026
Merged

kevinushey merged 1 commit into
mainfrom
bugfix/18378-data-viewer-row-height

Conversation

@kevinushey

Copy link
Copy Markdown
Collaborator

The data viewer's virtual-scroll math assumes every data row is exactly ROW_HEIGHT (23px), but height on a table cell is only a minimum. The grid's font stack starts with DejaVu Sans, whose 11px line box (13px) fits inside the 14px available (23px minus 8px vertical padding and 1px border). On platforms where DejaVu Sans is not installed, the resolved font's normal line box is 15px -- Segoe UI on Windows, Noto Sans on Fedora and RHEL 10+ (which dropped DejaVu from the default font set) -- so every rendered row grew to 24px while the spacer rows standing in for off-window rows stayed at 23px per row. Ctrl+End computes its scroll target from the 23px constant, so the jump landed one pixel short per rendered row (~24px in the e2e layout), leaving the last row cut off below the bottom edge.

This explains the platform matrix in the issue exactly: Ubuntu, Debian, and Rocky 9 ship DejaVu Sans (13px line box, 23px rows, pass); macOS resolves Lucida Grande (13px, pass); Windows, Fedora 43/44, and Rocky 10 resolve a 15px-line-box font (24px rows, fail). Architecture is irrelevant, matching the observed results.

The fix pins line-height: 14px on the grid td so 14px line + 8px padding + 1px border = --row-height exactly, independent of platform font metrics. Since line-height applies uniformly to all font-fallback runs, this also keeps rows at 23px for cell text drawn with fallback fonts (e.g. CJK). Verified in headless Chromium with the real Noto Sans TTF: with normal line-height the row measures 24px (line box 15px); with the pin it measures exactly 23px, even under fonts with far taller metrics (Zapfino's 38px line box).

Also removes the test.fixme Windows CI guard from the "End scrolls to the last row of the current column, fully visible" e2e test -- it was skipping exactly this failure (the observed ~24px shortfall in its comment is the per-rendered-row pixel deficit) -- so Windows CI now verifies the fix.

The full data viewer e2e spec passes on macOS desktop-dev (40/40) with the fix in place; dispatched e2e runs on Fedora 43 and Windows Server 2025 validate it on platforms that reproduce the bug.

Fixes #18378.

The virtual-scroll math assumes every data row is exactly ROW_HEIGHT
(23px), but height on a table cell is only a minimum: on platforms whose
UI font has an 11px line box taller than 14px (Segoe UI on Windows, Noto
Sans on Fedora and RHEL 10+, which no longer ship DejaVu Sans), every
rendered row grew to 24px. Ctrl+End computes its scroll target from the
23px constant, so the jump stopped one pixel short per rendered row
(~24px in the e2e layout), leaving the last row cut off below the fold.

Pin the td line-height to 14px so 14px line + 8px padding + 1px border
equals --row-height exactly, independent of platform font metrics.
Verified in headless Chromium with the real Noto Sans: normal line box
is 15px -> 24px rows; with the pin, rows measure 23px even under fonts
with far taller metrics.

Also un-fixme the Windows CI guard on the End/Ctrl+End e2e test, which
was skipping exactly this failure.

Addresses #18378.
@kevinushey kevinushey added this to the 2026.08 (Yellow Yarrow) milestone Jul 29, 2026
@posit-snyk-bot

posit-snyk-bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
1909 0 356 1
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ desktop-linux 474 0 88 0
✅ desktop-macos 477 0 85 1
✅ desktop-windows 479 0 89 0
✅ server-linux 459 0 94 0
✅ setup 20 0 0 0
View / download the full report

View report online -- opens in the browser, no download needed. Available for 14 days.

Download playwright-report.zip -- extract and open index.html

Includes screenshots, traces, and step-by-step details for every test. Expires in 15 days.


All platforms - commit 732f23018e0e95dd6160a455964ecbd8e31afe59 - Run #390

@kevinushey
kevinushey merged commit 42b0000 into main Jul 30, 2026
36 of 37 checks passed
@kevinushey
kevinushey deleted the bugfix/18378-data-viewer-row-height branch July 30, 2026 01:02
@kevinushey

Copy link
Copy Markdown
Collaborator Author

Validation results:

Note for a possible follow-up: branch dispatches of the Linux e2e workflow with cold caches cannot complete a Fedora source build inside build_timeout_minutes: 90 (cache saves are main-gated, and the first attempt was cancelled at 90 minutes with ~700 TUs compiled). Not part of this PR.

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.

Data Viewer stops short of the last row on Ctrl+End on Windows and RHEL-family Linux

2 participants