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

Automatic Adjustment of Puter Windows to Stay Within Viewport on Browser Resize #12

Closed
jelveh opened this issue Mar 4, 2024 · 1 comment · Fixed by #120
Closed

Automatic Adjustment of Puter Windows to Stay Within Viewport on Browser Resize #12

jelveh opened this issue Mar 4, 2024 · 1 comment · Fixed by #120
Labels
enhancement New feature or request

Comments

@jelveh
Copy link
Contributor

jelveh commented Mar 4, 2024

Users often adjust the size of their browser window for various reasons, such as multitasking or changing display settings. Currently, in Puter, resizing the browser can lead to open windows moving out of the viewport, making them inaccessible or partially hidden. This issue can disrupt the user's workflow and requires manual adjustment to bring these windows back into view. Implementing an automatic adjustment feature that ensures all windows remain within the viewport during and after a browser resize would improve usability and UX.

Expected Behavior:

  • Automatic Re-positioning: When the browser window is resized, any Puter window (or windows) that ends up partially or fully outside of the viewport should automatically be re-positioned to ensure it remains visible within the new viewport dimensions.
  • Intelligent Placement: The adjustment should not merely bring the window back into view but should do so intelligently to minimize disruption. For instance, if only a small portion of the window is out of view, the system should adjust it minimally to make it fully visible again.
  • Respect User Layout: While ensuring window visibility, the system should strive to maintain the user's original layout as much as possible, avoiding drastic changes that could disorient the user.
  • Notification/Option to Revert: Optionally, after an automatic adjustment, a subtle notification could be provided to inform the user of the change, with an option to undo the adjustment if desired.
@jelveh jelveh added the enhancement New feature or request label Mar 13, 2024
@meetqy
Copy link
Contributor

meetqy commented Mar 16, 2024

image

I want to solve this problem by listening to the browser zoom, recalculating the position, is that possible?

new top = 145.2/1.25, new left = 710/1.25

if user has more dialog window, can use same as method.

image

meetqy added a commit to meetqy/puter that referenced this issue Mar 17, 2024
jelveh added a commit that referenced this issue Mar 21, 2024
fix: Automatic Adjustment of Puter Windows to Stay Within Viewport on Browser Resize #12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants