Update shinytest2 screenshot defaults to avoid relayout issues
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 123
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Following up on rstudio/chromote#129, there are two things that shinytest2 can do:
-
When
selector = "viewport", shinytest2 can setcaptureBeyondViewport = FALSEfor chromote's screenshot method. -
When
selector = "scrollable_area", shinytest2 could query Chrome to determine how big the scrollable area is, then resize the viewport to match that size before screenshotting withcaptureBeyondViewport = FALSE, followed by restoring the viewport size.This option is more or less the pattern used by puppeteer, mentioned in https://github.com/rstudio/chromote/issues/96#issuecomment-1424642373.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing shinytest2's screenshot handling for the viewport and scrollable_area selectors, including its chromote screenshot calls. Check how Chrome viewport dimensions can be queried and restored. Done means both selectors avoid relayout issues, use captureBeyondViewport = FALSE, and restore the original viewport after a scrollable-area capture.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100