Skip to content

feat(capture): capture a whole scrolling area - #22

Open
erfnzdeh wants to merge 1 commit into
PGHQdev:mainfrom
erfnzdeh:feat/capture-scroll-area
Open

erfnzdeh wants to merge 1 commit into
PGHQdev:mainfrom
erfnzdeh:feat/capture-scroll-area

Conversation

@erfnzdeh

@erfnzdeh erfnzdeh commented Nov 1, 2026

Copy link
Copy Markdown

Full-page capture finds the page's main scroller on its own, but it picks the largest one. A chat pane, a code panel, or a feed column next to it cannot be captured whole: element capture stops at the part on screen.

  • When the element picker's selection is, or sits inside, a box that scrolls vertically and is fully on screen, the picker shows Capture whole scrolling area beside Capture. Tab reaches it like the other buttons.
  • Choosing it tags that box data-oss-scroll-target and runs the full-page pipeline with scrollTarget on. getMetrics uses the tagged box as the scroller instead of searching, so each tile is cropped to it and the stitched image holds the box's whole content.
  • The capture is stored and delivered as an element capture. restoreCapture removes the tag, and the next picker or full-page capture clears a stale one. If the page re-rendered the box and the tag is gone when the capture starts, it falls back to the normal scroller search.
  • No new permissions. New string elementPickerScrollArea in all 19 locales: the 8 partial locales carry every element picker string, so it is there too.
  • README, ROADMAP, and the site are left for the release, as with other features.

Checks: lint, typecheck, unit tests (1355), build, Firefox build, smoke:element (new case: offer, tag, measurement, cleanup), smoke:a11y. Live check: loaded the built extension in Chrome for Testing 156, hovered a band inside a 300×300 box holding 1,000 px of content, chose Capture whole scrolling area, and got a 300×1000 PNG with all ten bands in order. The tag was gone afterwards and the box was back at its scroll position.

When the element picker's selection is, or sits inside, a box that
scrolls vertically and is fully on screen, the picker offers "Capture
whole scrolling area". Choosing it tags that box data-oss-scroll-target
and runs the full-page pipeline with scrollTarget on: getMetrics uses
the tagged box as the scroller, so each tile is cropped to it and the
stitched image holds the box's full content. restoreCapture removes the
tag, and a stale one is cleared by the next picker or full-page capture.

The capture is stored with the element mode. No new permissions. The
element picker smoke gains a scrolling box fixture covering the offer,
the tag, the measurement, and the cleanup.

This branch has not been deployed

No deployments
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.

1 participant