microsoft / surface-duo-compose-sdk

This repo contains components built with Jetpack Compose for the Microsoft Surface Duo.
MIT License
74 stars 2 forks source link

Use height window size class in window mode calculations #47

Closed khalp closed 2 years ago

khalp commented 2 years ago

๐Ÿ“ƒ Description

This pull request contains several updates to the WindowState library:

๐Ÿค” Motivation and Context

Keeps the library up to date with the latest stable releases and fixes some window size logic errors

๐Ÿงช How Has This Been Tested?

Tested manually on the following devices/emulators: 6.7, 7.6, 8, Pixel C, and Surface Duo

Also ran all UI and unit tests

โš’๏ธ Does the PR contain new tests or refactored old ones?

There are new and updated tests that check different combinations of width and height size classes

๐Ÿ“ท Screenshots (if appropriate)

Device Single landscape Single portrait Dual landscape Dual portrait
6.7 cannot reproduce due to emulator bug cannot reproduce due to emulator bug image image
7.6 image image image image
8 image image image image
Surface Duo 2 image image image image
Pixel C doesn't exist on large screen doesn't exist on large screen image image
The most notable changes are that previously, the 7.6 and 8 would show two panes in single landscape mode: 7.6 8
image image

๐Ÿ“ฆ Types of changes

โœ… Checklist