Skip to content

fix: resolve viewport dimensions from Vitest's iframe#314

Merged
AriPerkkio merged 2 commits intomainfrom
ari/fix-viewport-from-iframe
Apr 23, 2026
Merged

fix: resolve viewport dimensions from Vitest's iframe#314
AriPerkkio merged 2 commits intomainfrom
ari/fix-viewport-from-iframe

Conversation

@AriPerkkio
Copy link
Copy Markdown
Member

@AriPerkkio AriPerkkio commented Apr 16, 2026

Issue: Related to #295

What Changed

While testing in downstream projects, noticed that viewports were completely off. Vitests' built-in page.viewport() only adjust the UI's iframe's scaling and dimensions - not the whole viewport.

How to test

Added two commits that show the fix before-and-after. The test case can be used to reproduce the bug before fix is applied.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 16, 2026

🦋 Changeset detected

Latest commit: aa11a02

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@chromatic-com/vitest Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.63%. Comparing base (8fb348c) to head (aa11a02).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #314      +/-   ##
==========================================
+ Coverage   91.62%   91.63%   +0.01%     
==========================================
  Files          22       22              
  Lines         609      610       +1     
  Branches      103      102       -1     
==========================================
+ Hits          558      559       +1     
  Misses         48       48              
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AriPerkkio AriPerkkio force-pushed the ari/fix-viewport-from-iframe branch from 530f4ee to 0b092e4 Compare April 17, 2026 12:30
@AriPerkkio AriPerkkio force-pushed the ari/fix-viewport-from-iframe branch from 0b092e4 to 3b19458 Compare April 17, 2026 12:42
@AriPerkkio AriPerkkio marked this pull request as ready for review April 17, 2026 12:45
@AriPerkkio AriPerkkio self-assigned this Apr 17, 2026
@AriPerkkio AriPerkkio requested a review from ndelangen April 17, 2026 12:45
@AriPerkkio AriPerkkio force-pushed the ari/fix-viewport-from-iframe branch from 0d22d6d to 3b19458 Compare April 20, 2026 10:32
@AriPerkkio AriPerkkio force-pushed the ari/fix-viewport-from-iframe branch from 3b19458 to aa11a02 Compare April 22, 2026 10:23
@AriPerkkio AriPerkkio requested a review from JReinhold April 23, 2026 04:20
@AriPerkkio AriPerkkio merged commit 4d56fdd into main Apr 23, 2026
10 of 13 checks passed
@AriPerkkio AriPerkkio deleted the ari/fix-viewport-from-iframe branch April 23, 2026 12:02
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.

2 participants