rstudio / rstudio/shinytest2

Update shinytest2 screenshot defaults to avoid relayout issues

Open
#367 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. When selector = "viewport", shinytest2 can set captureBeyondViewport = FALSE for chromote's screenshot method.

  2. 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 with captureBeyondViewport = 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.