·
3 commits
to refs/heads/master
since this release
✨ New Features
Responsive Snapshot Capture
- Added
responsiveSnapshotCaptureoption to capture DOM across multiple viewport widths in a single snapshot operation - Automatically captures snapshots at configured mobile and desktop breakpoints
- Original viewport is preserved and restored after capture
- Each snapshot is tagged with its capture width for accurate comparison
New Environment Variables
| Variable | Description |
|---|---|
PERCY_RESPONSIVE_CAPTURE_MIN_HEIGHT |
Enable minimum height calculation for non-mobile widths |
PERCY_RESPONSIVE_CAPTURE_RELOAD_PAGE |
Reload page between viewport changes |
RESPONSIVE_CAPTURE_SLEEP_TIME |
Add delay (in seconds) between captures |
🔧 Enhancements
CORS Iframe Handling Improvements
- Added error handling for cross-origin iframe processing to prevent failures from breaking snapshot capture (#592)
- Delegated resource merging and iframe HTML manipulation to Percy CLI for improved performance (#593)
- CORS iframe data now stored in
domSnapshot.corsIframesfield - Reduced client-side processing overhead
📋 Requirements
Important
This release requires updates to your Percy CLI version. Please ensure compatibility before upgrading.
- Percy CLI v1.31.10 or higher is required for
utils.getResponsiveWidths()support - Percy CLI must handle the
domSnapshot.corsIframesfield for CORS iframe processing - Projects using CORS iframes must update Percy CLI to the latest version before upgrading to this SDK version
💥 Impact
Caution
Breaking Change — Projects using CORS iframes must update Percy CLI to the latest version. Failing to do so will result in CORS iframe data not being processed correctly.
| Area | Detail |
|---|---|
| Breaking | CORS iframe handling now delegates processing to Percy CLI. Older CLI versions will not process domSnapshot.corsIframes correctly. |
| Performance | Improved snapshot capture efficiency — resource merging and iframe HTML manipulation moved server-side to Percy CLI, reducing client-side overhead. |
| Compatibility | Responsive snapshot capture is automatically disabled when deferUploads is enabled. |
What's Changed
- added try catch for crossOriginFrames handling by @aryanku-dev in #592
- feat: add responsive snapshot capture and refactor CORS iframe handling by @bhokaremoin in #593
New Contributors
- @aryanku-dev made their first contribution in #592
- @bhokaremoin made their first contribution in #593
Full Changelog: v1.0.10...v1.1.0