Skip to content

Commit 0b85891

Browse files
committed
Merge branch 'main' into winui
2 parents 4c9177e + 8ecc496 commit 0b85891

File tree

188 files changed

+7550
-1248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+7550
-1248
lines changed

.editorconfig

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,49 @@
11
# Remove the line below if you want to inherit .editorconfig settings from higher directories
22
root = true
33

4-
# C# files
5-
[*.cs]
4+
# All files
5+
[*]
66

77
#### Core EditorConfig Options ####
88

99
# Encoding
1010
charset = utf-8
1111

1212
# Indentation and spacing
13+
tab_width = 4
1314
indent_size = 4
1415
indent_style = space
15-
tab_width = 4
1616

1717
# New line preferences
18-
end_of_line = crlf
18+
end_of_line = unset
1919
insert_final_newline = false
2020

21+
#### Build files ####
22+
23+
# Solution files
24+
[*.{sln,slnx}]
25+
tab_width = 4
26+
indent_size = 4
27+
indent_style = tab
28+
29+
# Configuration files
30+
[*.{json,xml,yml,config,runsettings}]
31+
indent_size = 2
32+
33+
# MSBuild files
34+
[*.{slnf,props,targets,projitems,csproj,shproj}]
35+
indent_size = 2
36+
37+
#### Source files ####
38+
39+
# Markdown files
40+
[*.md]
41+
indent_size = 2
42+
insert_final_newline = true
43+
44+
# C# files
45+
[*.cs]
46+
2147
#### .NET Coding Conventions ####
2248

2349
# this. and Me. preferences
@@ -138,8 +164,8 @@ csharp_space_between_square_brackets = false
138164
csharp_preserve_single_line_blocks = true
139165
csharp_preserve_single_line_statements = true
140166

141-
142167
# Naming Symbols
168+
143169
# constant_fields - Define constant fields
144170
dotnet_naming_symbols.constant_fields.applicable_kinds = field
145171
dotnet_naming_symbols.constant_fields.required_modifiers = const
@@ -171,6 +197,7 @@ dotnet_naming_symbols.non_interface_types.applicable_kinds
171197
dotnet_naming_symbols.interface_types.applicable_kinds = interface
172198

173199
# Naming Styles
200+
174201
# camel_case - Define the camelCase style
175202
dotnet_naming_style.camel_case.capitalization = camel_case
176203
# pascal_case - Define the Pascal_case style
@@ -239,15 +266,8 @@ dotnet_naming_rule.interface_types_must_be_prefixed_with_i.style
239266
dotnet_naming_style.prefix_private_field_with_underscore.capitalization = camel_case
240267
dotnet_naming_style.prefix_private_field_with_underscore.required_prefix = _
241268

242-
# Code files
269+
# .NET Code Analysis
243270

244-
# SA1009: Closing parenthesis should be spaced correctly
245-
# Needed for null forgiving operator after functions, "foo()!"
246-
dotnet_diagnostic.SA1009.severity = none
247-
248-
[*.{cs,vb}]
249-
250-
# Migrate back from old Toolkit.ruleset
251271
dotnet_diagnostic.CA1001.severity = warning
252272
dotnet_diagnostic.CA1009.severity = warning
253273
dotnet_diagnostic.CA1016.severity = warning
@@ -310,24 +330,43 @@ dotnet_diagnostic.CA2238.severity = warning
310330
dotnet_diagnostic.CA2240.severity = warning
311331
dotnet_diagnostic.CA2241.severity = warning
312332
dotnet_diagnostic.CA2242.severity = warning
333+
334+
# StyleCop Code Analysis
335+
336+
# Closing parenthesis should be spaced correctly: "foo()!"
337+
dotnet_diagnostic.SA1009.severity = none
338+
339+
# Hide warnings when using the new() expression from C# 9.
340+
dotnet_diagnostic.SA1000.severity = none
341+
313342
dotnet_diagnostic.SA1011.severity = none
314343
dotnet_diagnostic.SA1101.severity = none
344+
345+
# Hide warnings when accessing properties without "this".
346+
dotnet_diagnostic.SA1101.severity = none
315347
dotnet_diagnostic.SA1118.severity = none
316348
dotnet_diagnostic.SA1200.severity = none
317349
dotnet_diagnostic.SA1201.severity = none
318350
dotnet_diagnostic.SA1202.severity = none
319351
dotnet_diagnostic.SA1309.severity = none
320352
dotnet_diagnostic.SA1310.severity = none
353+
354+
# Hide warnings for record parameters.
355+
dotnet_diagnostic.SA1313.severity = none
356+
357+
# TypeParameterNamesMustBeginWithT: We do have a few templates that don't start with T. We need to double check that changing this is not a breaking change. If not, we can re-enable this.
358+
dotnet_diagnostic.SA1314.severity = none
359+
360+
# UseTrailingCommasInMultiLineInitializers: This would also mean a lot of changes at the end of all multiline initializers. It's also debatable if we want this or not.
361+
dotnet_diagnostic.SA1413.severity = none
362+
321363
dotnet_diagnostic.SA1600.severity = none
322364
dotnet_diagnostic.SA1602.severity = none
323365
dotnet_diagnostic.SA1611.severity = none
366+
367+
# DocumentationTextMustEndWithAPeriod: Let's enable this rule back when we shift to WinUI3 (v8.x). If we do it now, it would mean more than 400 file changes.
368+
dotnet_diagnostic.SA1629.severity = none
369+
324370
dotnet_diagnostic.SA1633.severity = none
325371
dotnet_diagnostic.SA1634.severity = none
326372
dotnet_diagnostic.SA1652.severity = none
327-
328-
dotnet_diagnostic.SA1629.severity = none # DocumentationTextMustEndWithAPeriod: Let's enable this rule back when we shift to WinUI3 (v8.x). If we do it now, it would mean more than 400 file changes.
329-
dotnet_diagnostic.SA1413.severity = none # UseTrailingCommasInMultiLineInitializers: This would also mean a lot of changes at the end of all multiline initializers. It's also debatable if we want this or not.
330-
dotnet_diagnostic.SA1314.severity = none # TypeParameterNamesMustBeginWithT: We do have a few templates that don't start with T. We need to double check that changing this is not a breaking change. If not, we can re-enable this.
331-
dotnet_diagnostic.SA1000.severity = none # Hide warnings when using the new() expression from C# 9.
332-
dotnet_diagnostic.SA1313.severity = none # Hide warnings for record parameters.
333-
dotnet_diagnostic.SA1101.severity = none # Hide warnings when accessing properties without "this".

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ assignees: ''
99

1010
<!-- 🚨 PLEASE DO NOT SKIP ANY INSTRUCTIONS AND INFORMATION MENTIONED BELOW AS THEY ARE ALL REQUIRED AND ESSENTIAL TO INVESTIGATE THE ISSUE. ISSUES WITH MISSING INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION
1111
...
12-
IF NOT CERTAIN ABOUT THE ISSUE AND REQUIRE MORE CLARITY THEN PLEASE POST ON "QUESTIONS & HELP" CATEGORY OF THE DISCUSSIONS PLATFORM [https://github.com/windows-toolkit/WindowsCommunityToolkit/discussions/categories/questions-help] WHERE YOU CAN DISCUSS AND ENAGAGE WITH THE COMMUNITY TO GAIN FURTHER CLAIRITY REGARDING THE ISSUE 🚨 -->
12+
IF NOT CERTAIN ABOUT THE ISSUE AND REQUIRE MORE CLARITY THEN PLEASE POST ON "QUESTIONS & HELP" CATEGORY OF THE DISCUSSIONS PLATFORM [https://github.com/CommunityToolkit/WindowsCommunityToolkit/discussions/categories/questions-help] WHERE YOU CAN DISCUSS AND ENAGAGE WITH THE COMMUNITY TO GAIN FURTHER CLAIRITY REGARDING THE ISSUE 🚨 -->
1313

1414
## Describe the bug
1515
A clear and concise description of what the bug is.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ assignees: ''
99

1010
<!-- 🚨 PLEASE PROVIDE DETAILED INFORMATION AND DO NOT SKIP ANY INSTRUCTIONS AND INFORMATION MENTIONED BELOW AS THEY ARE ALL REQUIRED AND ESSENTIAL TO HELP US UNDERSTAND THE FEATURE.
1111
...
12-
IF NOT CERTAIN ABOUT THE FEATURE AND REQUIRE MORE CLARITY THEN PLEASE POST ON "IDEAS" CATEGORY OF THE DISCUSSIONS PLATFORM [https://github.com/windows-toolkit/WindowsCommunityToolkit/discussions/categories/ideas] WHERE YOU CAN DISCUSS AND ENAGAGE WITH THE COMMUNITY TO GAIN FURTHER CLAIRITY REGARDING THE FEATURE 🚨 -->
12+
IF NOT CERTAIN ABOUT THE FEATURE AND REQUIRE MORE CLARITY THEN PLEASE POST ON "IDEAS" CATEGORY OF THE DISCUSSIONS PLATFORM [https://github.com/CommunityToolkit/WindowsCommunityToolkit/discussions/categories/ideas] WHERE YOU CAN DISCUSS AND ENAGAGE WITH THE COMMUNITY TO GAIN FURTHER CLAIRITY REGARDING THE FEATURE 🚨 -->
1313

1414
## Describe the problem this feature would solve
1515
<!-- Please describe or link to any existing issues or discussions.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Hi!
1212
1313
We try and keep our GitHub issue list for bugs and features.
1414
15-
Ideally, it'd be great to post your question on Stack Overflow using the 'windows-community-toolkit' tag here: https://stackoverflow.com/questions/tagged/windows-community-toolkit OR you may ask the question on "Questions & Help" category of the Discussions platform [https://github.com/windows-toolkit/WindowsCommunityToolkit/discussions/categories/questions-help]
15+
Ideally, it'd be great to post your question on Stack Overflow using the 'windows-community-toolkit' tag here: https://stackoverflow.com/questions/tagged/windows-community-toolkit OR you may ask the question on "Questions & Help" category of the Discussions platform [https://github.com/CommunityToolkit/WindowsCommunityToolkit/discussions/categories/questions-help]
1616
1717
🚨 PLEASE PROVIDE DETAILED INFORMATION THAT INCLUDE EXAMPLES, SCREENSHOTS, AND RELEVANT ISSUES IF POSSIBLE 🚨
1818

.github/ISSUE_TEMPLATE/win32_controls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ assignees: ''
1010
<!--
1111
Hi!
1212
13-
We have a separate toolkit repo for our Win32 controls that work in WPF or WinForms, please file an issue instead at https://github.com/windows-toolkit/CommunityToolkit.Win32/issues/new
13+
We have a separate toolkit repo for our Win32 controls that work in WPF or WinForms, please file an issue instead at https://github.com/CommunityToolkit/Microsoft.Toolkit.Win32/issues/new
1414
1515
Otherwise, this issue will automatically be moved to that repo.
1616

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Please check if your PR fulfills the following requirements:
3939
- [ ] Tested code with current [supported SDKs](../readme.md#supported)
4040
- [ ] Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link -->
4141
- [ ] Sample in sample app has been added / updated (for bug fixes / features)
42-
- [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets)
43-
- [ ] New major technical changes in the toolkit have or will be added to the [Wiki](https://github.com/windows-toolkit/WindowsCommunityToolkit/wiki) e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
42+
- [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/CommunityToolkit/WindowsCommunityToolkit-design-assets)
43+
- [ ] New major technical changes in the toolkit have or will be added to the [Wiki](https://github.com/CommunityToolkit/WindowsCommunityToolkit/wiki) e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
4444
- [ ] Tests for the changes have been added (for bug fixes / features) (if applicable)
4545
- [ ] Header has been added to all new source files (run *build/UpdateHeaders.bat*)
4646
- [ ] Contains **NO** breaking changes

CommunityToolkit.Common/CommunityToolkit.Common.csproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard1.4;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
5-
<LangVersion>9.0</LangVersion>
4+
<Nullable>Enable</Nullable>
65
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
7-
<Nullable>enable</Nullable>
8-
<Title>Windows Community Toolkit .NET Standard</Title>
6+
<TargetFrameworks>netstandard1.4;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
7+
</PropertyGroup>
8+
9+
<PropertyGroup>
10+
<Title>Windows Community Toolkit - Common (.NET Standard)</Title>
911
<Description>
1012
This package includes .NET Standard code only helpers such as:
1113
- IncrementalLoadingCollection: Simplifies the definition and usage of collections whose items can be loaded incrementally only when needed by the view.
1214
- String extensions and array extensions: These extensions make working with string and arrays easier.
1315
</Description>
14-
<PackageTags>Windows;Community;Toolkit;WCT;UWP;Incremental;Loading;Collection;IncrementalLoadingCollection;String;Array;extensions;helpers</PackageTags>
16+
<PackageTags>Incremental;Loading;Collection;IncrementalLoadingCollection;String;Array;Extensions;Helpers</PackageTags>
1517
</PropertyGroup>
1618

1719
<!-- .NET Standard 2.1 and .NET 5 already have [NotNullIfNotNull] and [NotNullWhen] -->

CommunityToolkit.Diagnostics/CommunityToolkit.Diagnostics.csproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard1.4;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
5-
<LangVersion>9.0</LangVersion>
4+
<Nullable>Enable</Nullable>
65
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
7-
<Nullable>enable</Nullable>
8-
<Title>Windows Community Toolkit Diagnostics .NET Standard</Title>
6+
<TargetFrameworks>netstandard1.4;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
7+
</PropertyGroup>
8+
9+
<PropertyGroup>
10+
<Title>Windows Community Toolkit - Diagnostics (.NET Standard)</Title>
911
<Description>
1012
This package includes .NET Standard code only helpers such as:
1113
- Guard: Helper methods to verify conditions when running code.
1214
- ThrowHelper: Helper methods to efficiently throw exceptions.
1315
</Description>
14-
<PackageTags>Windows;Community;Toolkit;WCT;UWP;Incremental;Loading;Collection;IncrementalLoadingCollection;String;Array;extensions;helpers</PackageTags>
16+
<PackageTags>Diagnostics;Guard;ThrowHelper;TypeInfo;Extensions;Helpers</PackageTags>
1517
</PropertyGroup>
1618

1719
<Choose>

CommunityToolkit.Diagnostics/Generated/Guard.Collection.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ GenerateTextForItems(EnumerableTypes, item =>
266266
// in 2-complement to perform the bounds check with a single compare operation.
267267
// This is the same trick used throughout CoreCLR as well.
268268
// For more info and code sample, see the original conversation here:
269-
// https://github.com/windows-toolkit/WindowsCommunityToolkit/pull/3131#discussion_r390682835
269+
// https://github.com/CommunityToolkit/WindowsCommunityToolkit/pull/3131#discussion_r390682835
270270
#>
271271
if ((uint)index < (uint)<#=item.Name#>.<#=item.Size#>)
272272
{

CommunityToolkit.HighPerformance/CommunityToolkit.HighPerformance.csproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard1.4;netstandard2.0;netstandard2.1;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
5-
<LangVersion>9.0</LangVersion>
6-
<Nullable>enable</Nullable>
4+
<Nullable>Enable</Nullable>
75
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
8-
<Title>Windows Community Toolkit High Performance .NET Standard</Title>
6+
<TargetFrameworks>netstandard1.4;netstandard2.0;netstandard2.1;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
7+
</PropertyGroup>
8+
9+
<PropertyGroup>
10+
<Title>Windows Community Toolkit - High Performance (.NET Standard)</Title>
911
<Description>
1012
This package includes high performance .NET Standard helpers such as:
1113
- Memory2D&lt;T&gt; and Span2D&lt;T&gt;: two types providing fast and allocation-free abstraction over 2D memory areas.
@@ -22,7 +24,7 @@
2224
- Ref&lt;T&gt;: a stack-only struct that can store a reference to a value of a specified type.
2325
- NullableRef&lt;T&gt;: a stack-only struct similar to Ref&lt;T&gt;, which also supports nullable references.
2426
</Description>
25-
<PackageTags>Windows;Community;Toolkit;WCT;UWP;core;standard;unsafe;span;memory;string;array;stream;buffer;extensions;helpers;parallel;performance</PackageTags>
27+
<PackageTags>Parallel;Performance;Unsafe;Span;Memory;String;StringPool;Array;Stream;Buffer;Extensions;Helpers</PackageTags>
2628
</PropertyGroup>
2729

2830
<Choose>

0 commit comments

Comments
 (0)