Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix resizing view breaking app on high DPI displays #5275

Merged
merged 8 commits into from
Feb 6, 2025

Conversation

lf94
Copy link
Contributor

@lf94 lf94 commented Feb 5, 2025

I was only able to test this through DPI emulation, but I was able to reproduce. Please try on your Mac screens.

The issue was kind of a mix of sub issues:

  1. The high DPI nature of Mac screens was getting us into an app behavior where we hit the stream resolution cap of 2000x2000.
  2. The cap means that not only is there a ThreeJS scaling factor, but also a DOM element scaling factor to keep in mind.
  3. This can all be avoided by assuming the whole view area is clickable, and then "normalizing" those coordinates to the requested, bounded stream resolution.

Copy link

vercel bot commented Feb 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Feb 6, 2025 3:08pm

Copy link

qa-wolf bot commented Feb 5, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@lf94
Copy link
Contributor Author

lf94 commented Feb 5, 2025

2025-02-04_17-30-59.mp4

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.05%. Comparing base (e0de049) to head (1371b2c).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5275   +/-   ##
=======================================
  Coverage   86.05%   86.05%           
=======================================
  Files          92       92           
  Lines       33204    33204           
=======================================
  Hits        28575    28575           
  Misses       4629     4629           
Flag Coverage Δ
wasm-lib 86.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Collaborator

@pierremtb pierremtb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm this makes it possible to work with selections on a fullscreen app with native resolution of 3024x1964 here. Which currently doesn't work on main.

@lf94
Copy link
Contributor Author

lf94 commented Feb 6, 2025

@adamchalmers confirmed on his monster monitor!

@lf94 lf94 merged commit 019cb81 into main Feb 6, 2025
31 checks passed
@lf94 lf94 deleted the lf94/screen-resize-breaks-clicks branch February 6, 2025 17:06
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