WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

Add compatibility for ISettingsStorageHelper in CommunityToolkit.Common v8

Open LeftTwixWand opened this issue 2 years ago • 2 comments

Describe the bug

ApplicationDataStorageHelper doesn't work with CommunityToolkit.Common v8. It refers to the ISettingsStorageHelper which was moved to the other namespace in v8:

Version 7: CommunityToolkit.Helpers.ISettingsStorageHelper

Version 8: CommunityToolkit.Common.Helpers.ISettingsStorageHelper

Maybe, it should be included to the v8 Release Plan: #4488

Regression

v7 of CommunityToolkit.Common

Reproducible in sample app?

  • [X] This bug can be reproduced in the sample app.

Steps to reproduce

Add: CommunityToolkit.Common v8
Add: CommunityToolkit.WinUI v7

Run this code:

ApplicationDataStorageHelper applicationDataStorage = new(ApplicationData.Current);
applicationDataStorage.TryRead("MyKey", out string? text);

Expected behavior

I would like current WinUI (7) package version to support Common package with version 8

Screenshots

image

Windows Build Number

  • [ ] Windows 10 1809 (Build 17763)
  • [ ] Windows 10 1903 (Build 18362)
  • [ ] Windows 10 1909 (Build 18363)
  • [ ] Windows 10 2004 (Build 19041)
  • [ ] Windows 10 20H2 (Build 19042)
  • [ ] Windows 10 21H1 (Build 19043)
  • [X] Windows 11 21H2 (Build 22000)
  • [ ] Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • [ ] Windows 10, version 1809 (Build 17763)
  • [ ] Windows 10, version 1903 (Build 18362)
  • [ ] Windows 10, version 1909 (Build 18363)
  • [X] Windows 10, version 2004 (Build 19041)
  • [ ] Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

No response

Device form factor

Desktop

Nuget packages

CommunityToolkit.Common v8 CommunityToolkit.WinUI v7

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

LeftTwixWand avatar Mar 29 '23 23:03 LeftTwixWand

Hi @Yw0ke, thanks for writing! I apologize for the delay in responding.

This is a bug that I already fixed locally and have slated for the next release of deej, but it's not currently available publicly yet. If you'd be able to reach out to me through our Discord server, I can probably send you a version that only makes the config reload notification appear if the contents of the config file actually change. Let me know if that helps! Otherwise, leaving this issue open until the next version is released.

omriharel avatar Mar 20 '24 12:03 omriharel

Thanks a lot for your answer, I'll be waiting on the next release since I'm not a discord user tho. I did find a way to fix it for now anyway. Since I updated to Windows 11 when I use the taskbar icon to open the config file and add lines when I need to, the "config.yaml" is opened in the default windows notepad. If you don't close the tab after editing the file, and windows or another program on my current setup is triggering an event that uses the default notepad. Since the config file is still open, your program sees that as "something changed in there" and send a toast notification. Maybe this can help someone while the update comes along. Other than this little bug, i'm really pleased with your great work @omriharel 🤜 🤛

Yw0ke avatar Mar 24 '24 16:03 Yw0ke