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 iPad split screen #8317

Merged
merged 1 commit into from
Nov 7, 2024
Merged

Fix iPad split screen #8317

merged 1 commit into from
Nov 7, 2024

Conversation

enahum
Copy link
Contributor

@enahum enahum commented Nov 6, 2024

Summary

A couple of things were fixed here, first instead of using the window frame we are using the window bounds and secondly we only consider it to be a tablet layout if the app takes at least 2/3 of the screen width.

bounds vs. frame
  • bounds: Represents the window’s coordinate system and its size within its own context. The origin is typically (0,0), with width and height that represent the actual size of the window's content area.
  • frame: Represents the window’s rectangle relative to its parent coordinate system, typically the screen’s coordinate space. If the window is rotated or scaled, the frame will change to reflect its position and orientation relative to the screen.

Using bounds is generally more reliable for checking size because:

  1. Orientation Independence: bounds always represents the actual content size of the window, regardless of its position or rotation on the screen. When a device is rotated, the frame can change, but bounds will consistently represent the usable size.
  2. Clarity of Intent: By using bounds, we’re explicitly focusing on the window’s internal size (i.e., the actual content area), which is more aligned with checking how much of the screen’s width the window occupies.

Ticket Link

https://mattermost.atlassian.net/browse/MM-61317

Device Information

This PR was tested on: iPad

Release Note

Fixed layout on iPad with split screen & stage manager

@enahum enahum added the 2: Dev Review Requires review by a core commiter label Nov 6, 2024
@enahum enahum requested review from larkox and rahimrahman November 6, 2024 00:13
@enahum enahum added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Nov 7, 2024
@enahum enahum merged commit d7e5499 into main Nov 7, 2024
28 checks passed
@enahum enahum deleted the MM-61317 branch November 7, 2024 00:30
@amyblais amyblais added this to the v2.23.0 milestone Nov 7, 2024
@lindy65
Copy link

lindy65 commented Nov 7, 2024

@enahum - please remember to send PRs through QA-review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants