Skip to content

Conversation

@shweaver-MSFT
Copy link
Member

@shweaver-MSFT shweaver-MSFT commented Jul 20, 2021

Fixes #86

PR Type

What kind of change does this PR introduce?

  • Feature

What is the current behavior?

Currently the roaming settings work is located in the UWP directory, making it only usable in UWP apps. It is also based on the older ObjectStorage interfaces in WCT, which are being deprecated in the near future.

What is the new behavior?

The roaming settings helpers have been majorly refactored and most importantly simplified! The new code is much easier to work with in my opinion, but it is also segmented a little differently.

Old, removed ❌

  • CommunityToolkit.Graph.Uwp package:
    • Helpers/RoamingSettings/BaseRoamingSettingsDataStore.cs
    • Helpers/RoamingSettings/IRoamingSettingsDataStore.cs
    • Helpers/RoamingSettings/OneDriveDataStore.cs
    • Helpers/RoamingSettings/RoamingSettingsHelper.cs
    • Helpers/RoamingSettings/UserExtensionDataStore.cs

New, improved ✨

  • CommunityToolkit.Graph package:
    • Helpers/RoamingSettings/IRemoteSettingsStorageHelper.cs - Defines basic sync functionality for a remote settings storage location. Based on the WCT preview interface, ISettingsStorageHelper.
    • Helpers/RoamingSettings/OneDriveDataSource.cs - Internal class for handling Graph operations with OneDrive.
    • Helpers/RoamingSettings/OneDriveStorageHelper.cs - Helper for storing files in OneDrive via Graph. Based on the WCT preview IFileStorageHelper interface.
    • Helpers/RoamingSettings/UserExtensionDataSource.cs - Internal class for handling Graph operations with user extensions.
    • Helpers/RoamingSettings/UserExtensionStorageHelper.cs - Helper for storing settings metadata in open extensions on the Graph User object. Based on IRemoteSettingsStorageHelper.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

TODO:

  • Testing
  • Write docs
  • Update Microsoft.Toolkit nuget dependency once new WCT storage helper interfaces are released.

@shweaver-MSFT shweaver-MSFT self-assigned this Jul 20, 2021
@ghost
Copy link

ghost commented Jul 20, 2021

Thanks shweaver-MSFT for opening a Pull Request! The reviewers will test the PR and highlight if there is any merge conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@shweaver-MSFT shweaver-MSFT modified the milestone: 7.1.0 Jul 20, 2021
@shweaver-MSFT shweaver-MSFT marked this pull request as ready for review July 29, 2021 23:11
@shweaver-MSFT shweaver-MSFT merged commit 6fdcc7d into dev/7.1.0 Aug 2, 2021
@shweaver-MSFT shweaver-MSFT deleted the shweaver/storage-interfaces branch August 2, 2021 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants