-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Code Quality: Upgrade dependencies #16741
base: main
Are you sure you want to change the base?
Conversation
I temporarily brought back the sln for CI. |
CI is passing |
By the way, the work you put into this is amazing and the fact that it works is jaw-dropping 😮 |
|
||
static App() | ||
{ | ||
using var infoKey = Registry.CurrentUser.CreateSubKey(AppInformationKey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the virtual registry? Also, it would be preferable to create a helper class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's virtual registry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason not to use our existing settings service?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Information.*
APIs are no longer available in WCT 8.x. Registry ensures the thread safety IMO, so if multiple Files instances launch simultaneously, there won't be any read-write conflicts.
But yeah it can be anything. I implemented this just because it's convenient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so if multiple Files instances launch simultaneously, there won't be any read-write conflicts.
This is good enough reason to use the registry, however, we should put it in a separate helper for code quality.
This reverts commit 747dc7e.
⛔ No XAML files changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's looking amazing! ❤️
<configuration> | ||
<packageSources> | ||
<add key="Project Packages" value="src/Files.App/Assets/Libraries/" /> | ||
<add key="Lab-Windows" value="https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json" /> | ||
</packageSources> | ||
</configuration> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<configuration> | |
<packageSources> | |
<add key="Project Packages" value="src/Files.App/Assets/Libraries/" /> | |
<add key="Lab-Windows" value="https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json" /> | |
</packageSources> | |
</configuration> | |
<configuration> | |
<packageSources> | |
<clear /> | |
<add key="NuGet Gallery" value="https://api.nuget.org/v3/index.json" /> | |
<add key="Project Packages" value="src/Files.App/Assets/Libraries/" /> | |
<add key="Toolkit Labs" value="https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json" /> | |
</packageSources> | |
</configuration> |
This could potentially fix issues on some computers where the user has a custom NuGet setup.
Also rename to Toolkit Labs
to be consistent with what Microsoft calls it
/// The number and the width of items are calculated based on the | ||
/// screen resolution in order to fully leverage the available screen space. The property ItemsHeight define | ||
/// the items fixed height and the property DesiredWidth sets the minimum width for the elements to add a | ||
/// new column.</remarks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// new column.</remarks> | |
/// new column. | |
/// </remarks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and many other files are missing the license header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yaira2 there's a built in functionality to Visual Studio that automatically appends any header of your choice to each new file.
I can set this up in another PR if you would like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be a good idea to retain the .NET Foundation license header
using System.Threading.Tasks; | ||
|
||
namespace Files.App.Controls | ||
{ /// <summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ /// <summary> | |
{ | |
/// <summary> |
var gridSplitter = (GridSplitter)d; | ||
|
||
gridSplitter._hoverWrapper?.UpdateHoverElement(gridSplitter.CursorBehavior == | ||
SplitterCursorBehavior.ChangeOnSplitterHover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SplitterCursorBehavior.ChangeOnSplitterHover | |
SplitterCursorBehavior.ChangeOnSplitterHover |
var gridSplitter = (GridSplitter)d; | ||
|
||
gridSplitter._hoverWrapper?.UpdateHoverElement(gridSplitter.CursorBehavior == | ||
SplitterCursorBehavior.ChangeOnSplitterHover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SplitterCursorBehavior.ChangeOnSplitterHover | |
SplitterCursorBehavior.ChangeOnSplitterHover |
// Copyright (c) 2024 Files Community | ||
// Licensed under the MIT License. See the LICENSE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Copyright (c) 2024 Files Community | |
// Licensed under the MIT License. See the LICENSE. | |
// Copyright (c) Files Community | |
// Licensed under the MIT License. |
@@ -19,12 +19,14 @@ | |||
using WinRT; | |||
using static Vanara.PInvoke.ShlwApi; | |||
using static Vanara.PInvoke.User32; | |||
using System.Runtime.InteropServices.Marshalling; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if you created a WindowsTargetFramework
MSBuild switch so you don't need to specify $(TargetFrameworkVersion)-windows$(TargetWindowsVersion)
in every project file?
e.g.:
<!-- Directory.Build.props -->
<WindowsTargetFramework>$(TargetFrameworkVersion)-windows$(TargetWindowsVersion)</WindowsTargetFramework>
and then in the project file:
<!-- Files.*.csproj, Target: Windows -->
<TargetFramework>$(WindowsTargetFramework)</TargetFramework>
<TargetFrameworkVersion>net9.0</TargetFrameworkVersion> | ||
<TargetWindowsVersion>10.0.22621.0</TargetWindowsVersion> | ||
<MinimalWindowsVersion>10.0.19041.0</MinimalWindowsVersion> | ||
<WindowsSdkPackageVersion>10.0.22621.57</WindowsSdkPackageVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<WindowsSdkPackageVersion>10.0.22621.57</WindowsSdkPackageVersion> | |
<WindowsSdkPackageVersion>10.0.22621.57</WindowsSdkPackageVersion> | |
<DefineConstants>$(DefineConstants);$(Platform)</DefineConstants> |
I won't request changes for tiny quality and sanitization issues as long as it works (and looks perfect already) in this PR given lots of work have been put and it still WIP. |
Wait, this PR is WIP? |
Upgrade to .NET 9
Upgrade to WASDK 1.6
Upgrade to CommunityToolkit.WinUI 8.2
Upgrade to CsWinRT 2.2
Migrate to slnx (while still keeping sln for CI now)
Use centralized nuget package version management
Use new Microsoft.UI.Content metadata
Known issues:
Resolved / Related Issues
Supersedes #16156
Supersedes #16557
Closes #14826
Closes #16705
Steps used to test these changes
Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.