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

Remove Forms DeviceInfo and use Essentials #3213

Merged
merged 8 commits into from
Nov 2, 2021
Merged

Conversation

mattleibow
Copy link
Member

@mattleibow mattleibow commented Nov 1, 2021

Description of Change

Remove usage of the internal/hidden DeviceInfo and use the APIs in Essentials.

Part of #1965

Additions made

  • Adds

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)
  • Targets a single property for a single control (or intertwined few properties)
  • Adds the property to the appropriate interface
  • Avoids any changes not essential to the handler property
  • Adds the mapping to the PropertyMapper in the handler
  • Adds the mapping method to the Android, iOS, and Standard aspects of the handler
  • Implements the actual property updates (usually in extension methods in the Platform section of Core)
  • Tags ported renderer methods with [PortHandler]
  • Adds an example of the property to the sample project (MainPage)
  • Adds the property to the stub class
  • Implements basic property tests in DeviceTests

Does this PR touch anything that might affect accessibility?

  • Does this PR introduce a new control? (If yes, add an example using SemanticProperties to the SemanticsPage)
  • APIs that modify focusability?
  • APIs that modify any text property on a control?
  • Does this PR modify view nesting or view arrangement in anyway?
  • Is there the smallest possibility that your PR will change accessibility?
  • I'm not sure, please help me

If any of the above checkboxes apply to your PR, then the PR will need to provide testing to demonstrate that accessibility still works.

@Eilon Eilon added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label Nov 1, 2021
@Redth Redth merged commit c359458 into main Nov 2, 2021
@Redth Redth deleted the dev/remove-deviceinfo branch November 2, 2021 14:31
conceptdev added a commit to conceptdev/maui that referenced this pull request Dec 7, 2021
based on changes in dotnet#3213 where APIs moved to Essentials
PureWeen added a commit that referenced this pull request Apr 5, 2022
#5020)

* initial commit

* seems to build?

* add page to sample

Other > Dual Screen

* sample screen tweaks

* trying to wire up the hinge angle

* correct port of visualElement

* - fix up measure calls

* correct configChanges in Android sample

* - remeasure if mode changed

* add AndroidX.Window.WindowJava with log output

* kinda measuring but not really

* - hostbuilder extension

* - include file

* basic hostbuilder test

* most debug lines to figure out why it's not working

* kinda works except on first span :|

* add testing features on TwoPaneViewPage

* remove un-used UpdateMetrics interface method

* remove commented FoldEventArgs

* remove un-used UpdateMetrics interface method

* deleting code

* - remove extra code

* [dualscreen] rebase

based on changes in #3213 where APIs moved to Essentials

* wire up hostbuilder

untested

* [dualscreen] progress check-in - work not complete

* update fixes

* [dualscreen] wire up twopaneview properties

* [dualscreen] Jetpack Window Manager 1.0 stable

via Xamarin.AndroidX.Window.WindowJava NuGet  1.0.0.7

* [dualscreen] add test properties to XAML

* [dualscreen] remove MainActivity hardcoding, use HostBuilderExtension

Note that this de-coupling broke the hinge sensor reading - to be fixed

* [dualscreen] fix hinge sensor

requires reference to Activity context

* [dualscreen] tweak activity context

* [dualscreen] correct for Samsung Galaxy Fold

Use the hinge orientation rather than portrait/landscape of the outer window

* [dualscreen] refactor project name (remove -net6)

* [dualscreen] remove prototyping code from sample project

hardcoding in mainactivity helped to get the dualscreen refactoring done, now removed and enabled via HostBuilderExtensions

* [dualscreen] add comments

* [dualscreen] fix bug: hinge not recognized when spanned on open

* [dualscreen] address some of the PR feedback

* [dualscreen] rebase fixes

mostly Rectangle -> Rect and removing Device.BeginInvokeOnMainThread

* [foldable] namespace refactor from DualScreen to Foldable

also removed `Controls` from non-UI namespaces

* [foldable] refactor project name from DualScreen to Foldable

did NOT yet change the project's filesystem/folder name

* [foldable] refactor DualScreenService -> FoldableService

including IDualScreenService -> IFoldableService

* [foldable] refactor filenames DualScreenService -> FoldableService

* [foldable] address PR feedback

- remove LINQ
- use C# 8 feature ??=

* - workloads

* - cleanup

* - delete commented out code

* [foldable] remove debug log and commented-out code

minor refactor isSeparating -> IsSeparating

* [foldable] rename project folder

and delete unused sample project/folder

* [foldable] remove commented code (PR feedback)

* - organize the code a bit and switch to using services

* - fix dualscreen service to pull correctly

* - cleanup

* - fix update calls

* - fix some measures

* - add some additional checks

* - remove screen check

* - fix height passed in for mode updates

* - remove watch for changes

* - remove code that checks

* - fix workloads

* - workloads

* - fix paths

* - fix nuget.config

* Update Microsoft.Maui.Controls.Foldable.Runtime.csproj

* Update Microsoft.Maui.Controls.Ref.csproj

* - change controls workloads back

* - remove from workloads

* - add foldable to build.tasks

* Update Microsoft.Maui.Samples.slnf

* - leave foldables

* [foldable] update namespaces after Essentials

* [foldable] add Devices where Essentials was removed

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@samhouts samhouts added the fixed-in-6.0.101-preview.11.3 Look for this fix in 6.0.101-preview.11.3! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info fixed-in-6.0.101-preview.11.3 Look for this fix in 6.0.101-preview.11.3!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants