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

Adopt chromium methodology for determining tablet on Windows #22809

Merged
merged 4 commits into from
Aug 15, 2024

Conversation

daltzctr
Copy link
Contributor

@daltzctr daltzctr commented Jun 3, 2024

Description of Change

Uses a more conservative approach of determining tablet mode on Windows. This approach is functionally identical to Chromium's implementation for determining tablet on Windows. Additionally, it adds a few documentation comments on the observed behavior.

I don't have a good idea on how to add a unit test for this, and it's a bit of an implicit breaking change (some users who had tablet layouts may have desktop layouts now), but I think that number of users affected will be near, or at 0.

Issues Fixed

Possibly fixes #22093

@daltzctr daltzctr requested a review from a team as a code owner June 3, 2024 20:13
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jun 3, 2024
Copy link
Contributor

Hey there @daltzctr! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@daltzctr
Copy link
Contributor Author

daltzctr commented Jun 3, 2024

@dotnet-policy-service agree [company="CTR Electronics"]

@daltzctr
Copy link
Contributor Author

daltzctr commented Jun 3, 2024

@dotnet-policy-service agree company="CTR Electronics"

@daltzctr daltzctr marked this pull request as draft June 3, 2024 20:17
@daltzctr
Copy link
Contributor Author

daltzctr commented Jun 3, 2024

Marking as draft until I confirm a device that is Windows that should be tablet is still tablet (I will test on my Surface Pro 7). Reviews are still welcome.

@rmarinho rmarinho requested review from Foda, mattleibow and jfversluis and removed request for Eilon and StephaneDelcroix June 4, 2024 11:20
@daltzctr
Copy link
Contributor Author

daltzctr commented Jun 4, 2024

Surface Pro 7 (Windows 11): Keyboard Attached
Maui Controls Sample_aWmrzDIlzK

Surface Pro 7 (Windows 11): Keyboard Not-attached
Maui Controls Sample_Z4td4H16nN

Also tested on XPS 15 which now correctly reports as not-tablet,
Also tested on MSI GF65 which also reports as not-tablet (this always reported as not-tablet, but more devices are better)

@daltzctr daltzctr marked this pull request as ready for review June 4, 2024 15:22
@daltzctr
Copy link
Contributor Author

daltzctr commented Jun 4, 2024

This is ready for review and/or merge.

@jonathanpeppers
Copy link
Member

Can you share what device was wrong before (using stable MAUI)? Was it a Windows laptop that just always returned Tablet no matter what?

@daltzctr
Copy link
Contributor Author

daltzctr commented Jun 6, 2024

XPS 15 reports as tablet.

@daltzctr
Copy link
Contributor Author

daltzctr commented Jul 2, 2024

Can this get merged?

@daltzctr
Copy link
Contributor Author

daltzctr commented Jul 8, 2024

@Foda is this blocked on something?

@Foda Foda enabled auto-merge July 8, 2024 18:16
@daltzctr
Copy link
Contributor Author

daltzctr commented Aug 1, 2024

@Foda just a courtesy ping

@jfversluis
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

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

Congratulations on being a .NET MAUI contributor!

@Foda Foda merged commit 76f12f7 into dotnet:main Aug 15, 2024
97 checks passed
@daltzctr daltzctr deleted the fix-22093 branch August 15, 2024 13:49
@samhouts samhouts added fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-net8.0-nightly This may be available in a nightly release! labels Aug 27, 2024
@samhouts samhouts added fixed-in-9.0.0-rc.1.24453.9 and removed fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-net8.0-nightly This may be available in a nightly release! labels Sep 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OnIdiom doesn't respect Desktop setting on Windows
7 participants