Repository navigation
pin data viewer cell line-height so rows render at row-height everywhere - #18396
Merged
Merged
Conversation
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.
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
RStudio E2E - all platformsAll tests passed!
View / download the full reportView report online -- opens in the browser, no download needed. Available for 14 days. Download playwright-report.zip -- extract and open
All platforms - commit |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The data viewer's virtual-scroll math assumes every data row is exactly
ROW_HEIGHT(23px), butheighton 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: 14pxon the gridtdso 14px line + 8px padding + 1px border =--row-heightexactly, independent of platform font metrics. Sinceline-heightapplies 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.fixmeWindows 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.