Repository navigation
use the ide font for inline paged table output - #18901
Merged
Merged
Conversation
6 of 8 tasks
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 |
This branch was successfully deployed
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.
Intent
Inline data frame and
rmarkdown::paged_table()chunk output rendered every cell in bold on some Windows machines.Approach
The paged table is the one piece of chunk output rendered straight into the editor DOM rather than inside an output iframe, and RStudio's copy of
pagedtable.cssgave it a font stack of its own led by"Lucida Sans". On Windows desktop the rest of the IDE uses Segoe UI (the Electron default), so the two diverge. "Lucida Sans" ships with Office, not Windows, and a machine holding only its Demibold face satisfies the family request with that face, so weight-400 text renders demibold. The rmarkdown copy of the stylesheet declares no font at all, which is why knitted HTML looks normal.This drops the hardcoded stack and has
ChunkDataWidgetapply the IDE's proportional font to the widget element, matching every other proportional-font surface in the IDE.Testing
New e2e test (
notebook_paged_table_font.test.ts) runs a bare data frame and apaged_table()chunk and asserts the cell's computed font family equals the document body's and its weight is 400. It fails onmain(the cell resolves to the old standalone stack) and passes with this change, in server-dev mode on macOS.Fixes #18874.