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 IPlatformServices.RequestedTheme and use Essentials #4964

Merged
merged 11 commits into from
Feb 28, 2022

Conversation

mattleibow
Copy link
Member

Description of Change

The logic for the app theme is split up a bit, Essentials just reports the current theme and Core handled the change events on the views.

This PR merges all the ideas and removes the redundancy. Device.RequestedTheme just uses the Essentials API, and when Core decides it is time to trigger a theme change event, it fires the event and then Controls puts it all together.

Part of #1965

Additions made

  • Removes IPlatformServices (finally)
  • Removes OSAppTheme in favour of the exactly the same AppTheme from essentials

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 WinUI, 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.

@mattleibow mattleibow changed the base branch from dev/start-timer to main February 28, 2022 12:57
@mattleibow mattleibow self-assigned this Feb 28, 2022
@mattleibow mattleibow added this to the 6.0.300-preview.14 milestone Feb 28, 2022
@mattleibow mattleibow added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label Feb 28, 2022
@Redth Redth merged commit 9029320 into main Feb 28, 2022
@Redth Redth deleted the dev/requested-theme branch February 28, 2022 19:02
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
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
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants