Skip to content

Commit

Permalink
Merge branch 'net7.0' into release/7.0.1xx-rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarinho committed Oct 11, 2022
2 parents 6ba3d98 + e9aa374 commit 8be6693
Show file tree
Hide file tree
Showing 127 changed files with 1,470 additions and 1,073 deletions.
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "1.0.0-prerelease.22473.1",
"version": "1.0.0-prerelease.22506.1",
"commands": [
"xharness"
]
},
"api-tools": {
"version": "1.3.3",
"version": "1.3.5",
"commands": [
"api-tools"
]
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ body:
id: version-with-bug
attributes:
label: Version with bug
description: In what version do you see this issue? Run `dotnet --version` to find your version.
description: In what version do you see this issue? Run `dotnet workload list` to find your version.
options:
- 6.0 Release Candidate 2 or older
- 6.0 Release Candidate 3
Expand All @@ -59,7 +59,7 @@ body:
id: version-that-worked
attributes:
label: Last version that worked well
description: Is there a version on which this _did_ work? If yes, which one? If no or unknown, please select `Unknown/Other`. Run `dotnet --version` to find your version.
description: Is there a version on which this _did_ work? If yes, which one? If no or unknown, please select `Unknown/Other`. Run `dotnet workload list` to find your version.
options:
- 6.0 Release Candidate 2 or older
- 6.0 Release Candidate 3
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<Import Condition="'$(EnvironmentBuildPropsImported)' != 'True'" Project="$(MSBuildThisFileDirectory)eng\Environment.Build.props" />
<Import Condition="'$(SampleProject)' != 'True' and '$(CI)' == 'true'" Project="$(MSBuildThisFileDirectory)eng\SourceLink.Build.props" />
<ItemGroup Condition="'$(MSBuildVersion)' != '' AND '$(MSBuildVersion)' &lt; '16.7.0' ">
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.3.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.3.1" PrivateAssets="all" />
</ItemGroup>
<PropertyGroup>
<!-- We don't need to be warned that we are using a preview .NET -->
Expand Down
5 changes: 5 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
<!-- End: Package sources from dotnet-windowsdesktop -->
<!-- Begin: Package sources from dotnet-emsdk -->
<add key="darc-pub-dotnet-emsdk-c3fc739" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c/nuget/v3/index.json" />
<add key="darc-pub-dotnet-emsdk-c3fc739-5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c-5/nuget/v3/index.json" />
<add key="darc-pub-dotnet-emsdk-c3fc739-4" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c-4/nuget/v3/index.json" />
<add key="darc-pub-dotnet-emsdk-c3fc739-3" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c-3/nuget/v3/index.json" />
<add key="darc-pub-dotnet-emsdk-c3fc739-2" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c-2/nuget/v3/index.json" />
<add key="darc-pub-dotnet-emsdk-c3fc739-1" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c-1/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-emsdk -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<!-- <add key="local" value="artifacts" /> -->
Expand Down
28 changes: 28 additions & 0 deletions docs/CodeDocumentationGuidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Code Documentation Guidelines

In this document you will find the guidelines for adding XML comments to our codebase. By adding consistent and well-formatted comments to our code we benefit on all fronts: the online API docs are a useful reference for people looking up our APIs, the IntelliSense inside of Visual Studio will help developers understand our product better, and contributors and maintainers of this repository will have all the documentation at hand.

## Guidelines

For what kind of comments to our code we mainly follow the [recommended XML tags documentation](https://learn.microsoft.com/dotnet/csharp/language-reference/xmldoc/recommended-tags) by Microsoft. This is also what is best supported by Visual Studio. As a rule of thumb: complete your code first and just start typing a triple slash (`///`) above your code. That will suggest all the attributes that we want to see. Which attributes will show up is inferred from your code.

If you're unsure about how to document a certain element, have a look the [.NET API docs wiki](https://github.com/dotnet/dotnet-api-docs/wiki) which has a very extensive description on what kind of comment to add on which element in the code. We would highly recommend going through that and applying the same style of comments everywhere.

These are the tags that we would like to see when applicable: `<summary>`, `<remarks>`, `<returns>`, `<param>`, `<exception>`, `<inheritdoc>`, `<see>`, `<c>`.

* All public members should have at the very least a `<summary>`
* Keep the descriptions short and concise
* 1-2 lines typically, no screenshots or long code-blocks (those belong in the conceptual docs)
* Make sure the spelling is correct
* Add the descriptions at the highest base class/interface level. On an implementing type add `<inheritdoc>` on each member
* If the implemented member differs too much you can choose to override the comments; typically this shouldn't be necessary
* Do **not** add `<inheritdoc>` to overridden members, this will potentially cause issues in the online API docs system and doesn't add any value. The documentation is inherited implicitly.
* Where applicable make references to other types and parameters with the appropriate tags (`<see cref="YourType">` and `<paramref.........` respectively). This will create links in IntelliSense and online API docs
* Reference all C# keywords with a `<see langword="keyword"/>` tag. For example for `true`: `<see langword="true"/>`
* If you do want to add a minimal amount of code in your comment, use the `<c></c>` tags which formats it as code
* Think of things you'd like to know as a developer/future-you maintainer:
* default values that are not obvious
* in which scale a value should be (seconds or milliseconds, 0.0 is nothing 1.0 is everything)
* what exceptions can you expect and what triggers them

If you are looking for examples, browse through the codebase, searching for the `<summary>` tag or `///` should give you all kinds of examples.
7 changes: 4 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ If you are looking for documentation on how to *use* .NET MAUI, go to <https://d
The table below outlines the different docs in this folder and what they are helpful for.

| Documentation | What is it about? | Who is it for? |
|--------------------------------------------------------------------------|-------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| [Issue management](IssueManagementPolicies.md) | Overview of policies in place to manage issues| Community members and collaborators looking to understand how we handle closed issue, issues that need author feedback, etc | |
| [Release Schedule](ReleaseSchedule.md) | Overview of .NET MAUI version releases | Anyone who is interested in .NET MAUI versions and release dates | |
|----------------------|---------------------|---------------------|
| [Code Documentation Guidelines](CodeDocumentationGuidelines.md) | Overview of the guidelines for the inline code documentation | Community members and collaborators looking to understand how to add good inline code comments that fuel our IntelliSense and online API docs |
| [Issue management](IssueManagementPolicies.md) | Overview of policies in place to manage issues| Community members and collaborators looking to understand how we handle closed issues, issues that need author feedback, etc |
| [Release Schedule](ReleaseSchedule.md) | Overview of .NET MAUI version releases | Anyone who is interested in .NET MAUI versions and release dates |
| [Triage process](TriageProcess.md)| Overview of the issue triage process used in the repo | Anyone looking to understand the triage process on the repo |
1 change: 1 addition & 0 deletions docs/ReleaseSchedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ For a full list, including release notes, please refer to our [Releases page](ht

| Version | Release Date |
|---------|--------------|
| [6.0.536 (Service Release 4.1)](https://github.com/dotnet/maui/releases/tag/6.0.536) | 2022/09/14 |
| [6.0.486 (Service Release 4)](https://github.com/dotnet/maui/releases/tag/6.0.486) | 2022/08/09 |
| [6.0.424 (Service Release 3.1)](https://github.com/dotnet/maui/releases/tag/6.0.424) | 2022/08/01 |
| [6.0.419 (Service Release 3)](https://github.com/dotnet/maui/releases/tag/6.0.419) | 2022/07/20 |
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@
<Uri>https://github.com/dotnet/templating</Uri>
<Sha>3f4da9ced34942d83054e647f3b1d9d7dde281e8</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="1.0.0-prerelease.22473.1">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="1.0.0-prerelease.22503.4">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>a8e8fc0ffeb9b8c56ab799597597ce35d5be6111</Sha>
<Sha>c1a5db9daed957c62a2c803809c7aeb6fc05f4a3</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="1.0.0-prerelease.22473.1">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="1.0.0-prerelease.22503.4">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>a8e8fc0ffeb9b8c56ab799597597ce35d5be6111</Sha>
<Sha>c1a5db9daed957c62a2c803809c7aeb6fc05f4a3</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="1.0.0-prerelease.22473.1">
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="1.0.0-prerelease.22503.4">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>a8e8fc0ffeb9b8c56ab799597597ce35d5be6111</Sha>
<Sha>c1a5db9daed957c62a2c803809c7aeb6fc05f4a3</Sha>
</Dependency>
</ProductDependencies>
</Dependencies>
12 changes: 6 additions & 6 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<MicrosoftNETWorkloadEmscriptennet7Manifest70100PackageVersion>7.0.0-rc.2.22465.1</MicrosoftNETWorkloadEmscriptennet7Manifest70100PackageVersion>
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptennet7Manifest70100PackageVersion)</MicrosoftNETWorkloadEmscriptenPackageVersion>
<!-- wasdk -->
<MicrosoftWindowsAppSDKPackageVersion>1.1.4</MicrosoftWindowsAppSDKPackageVersion>
<MicrosoftWindowsAppSDKPackageVersion>1.1.5</MicrosoftWindowsAppSDKPackageVersion>
<MicrosoftWindowsSDKBuildToolsPackageVersion>10.0.22621.1</MicrosoftWindowsSDKBuildToolsPackageVersion>
<MicrosoftGraphicsWin2DPackageVersion>1.0.3.1</MicrosoftGraphicsWin2DPackageVersion>
<MicrosoftGraphicsWin2DPackageVersion>1.0.4</MicrosoftGraphicsWin2DPackageVersion>
<!-- Everything else -->
<MicrosoftAspNetCoreAuthorizationPackageVersion>7.0.0-rc.2.22452.11</MicrosoftAspNetCoreAuthorizationPackageVersion>
<MicrosoftAspNetCoreAuthenticationFacebookPackageVersion>7.0.0-rc.2.22452.11</MicrosoftAspNetCoreAuthenticationFacebookPackageVersion>
Expand All @@ -50,7 +50,7 @@
<_XamarinAndroidXSecurityVersion>1.1.0-alpha03</_XamarinAndroidXSecurityVersion>
<_XamarinGoogleCryptoTinkAndroidVersion>1.7.0</_XamarinGoogleCryptoTinkAndroidVersion>
<!-- Android Maps -->
<XamarinGooglePlayServicesMaps>117.0.0</XamarinGooglePlayServicesMaps>
<XamarinGooglePlayServicesMaps>118.1.0</XamarinGooglePlayServicesMaps>
<!--
SKIASHARP & HARFBUZZSHARP - the various things must be kept in sync with maui graphics:
- NuGet versions below
Expand All @@ -61,9 +61,9 @@
<_HarfBuzzSharpVersion>2.8.2.2</_HarfBuzzSharpVersion>
<_SkiaSharpNativeAssetsVersion>0.0.0-commit.193b587552cb0ed39372a049d7e6c692db98c267.483</_SkiaSharpNativeAssetsVersion>
<MicrosoftTemplateEngineTasksVersion>7.0.100-preview.5.22226.1</MicrosoftTemplateEngineTasksVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>1.0.0-prerelease.22473.1</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>1.0.0-prerelease.22473.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.22473.1</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>1.0.0-prerelease.22506.1</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>1.0.0-prerelease.22506.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>1.0.0-prerelease.22506.1</MicrosoftDotNetXHarnessCLIVersion>
<TizenUIExtensionsVersion>0.9.0</TizenUIExtensionsVersion>
<SvgSkiaPackageVersion>0.5.13</SvgSkiaPackageVersion>
<FizzlerPackageVersion>1.2.0</FizzlerPackageVersion>
Expand Down
2 changes: 1 addition & 1 deletion eng/automation/vs-workload.template.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
<ComponentResources Include="maui-ios" Version="@VS_COMPONENT_VERSION@" Category=".NET" Title=".NET MAUI SDK for iOS" Description=".NET SDK Workload for building MAUI applications that target iOS." />
<ComponentResources Include="maui-windows" Version="@VS_COMPONENT_VERSION@" Category=".NET" Title=".NET MAUI SDK for Windows" Description=".NET SDK Workload for building MAUI applications that target Windows." />
<WorkloadPackages Include="$(NuGetPackagePath)\Microsoft.NET.Sdk.Maui.Manifest*.nupkg" Version="@VS_COMPONENT_VERSION@" />
<MultiTargetPackNames Include="Microsoft.Maui.Sdk;Microsoft.Maui.Templates" />
<MultiTargetPackNames Include="Maui.Sdk;Maui.Templates" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public static class MauiHandlersCollectionExtensions
{
public static IMauiHandlersCollection TryAddCompatibilityRenderer(this IMauiHandlersCollection handlersCollection, Type controlType, Type rendererType)
{
Internals.Registrar.CheckIfRendererIsCompatibilityRenderer(rendererType);
Hosting.MauiAppBuilderExtensions.CheckForCompatibility();
Internals.Registrar.Registered.Register(controlType, rendererType);

Expand All @@ -22,6 +23,7 @@ public static IMauiHandlersCollection TryAddCompatibilityRenderer(this IMauiHand

public static IMauiHandlersCollection AddCompatibilityRenderer(this IMauiHandlersCollection handlersCollection, Type controlType, Type rendererType)
{
Internals.Registrar.CheckIfRendererIsCompatibilityRenderer(rendererType);
Hosting.MauiAppBuilderExtensions.CheckForCompatibility();
Internals.Registrar.Registered.Register(controlType, rendererType);

Expand All @@ -37,6 +39,7 @@ public static IMauiHandlersCollection AddCompatibilityRenderer(this IMauiHandler
public static IMauiHandlersCollection AddCompatibilityRenderer<TControlType, TMauiType, TRenderer>(this IMauiHandlersCollection handlersCollection)
where TMauiType : IView
{
Internals.Registrar.CheckIfRendererIsCompatibilityRenderer(typeof(TRenderer));
Hosting.MauiAppBuilderExtensions.CheckForCompatibility();
Internals.Registrar.Registered.Register(typeof(TControlType), typeof(TRenderer));

Expand All @@ -51,6 +54,7 @@ public static IMauiHandlersCollection AddCompatibilityRenderer<TControlType, TMa
public static IMauiHandlersCollection AddCompatibilityRenderer<TControlType, TRenderer>(this IMauiHandlersCollection handlersCollection)
where TControlType : IView
{
Internals.Registrar.CheckIfRendererIsCompatibilityRenderer(typeof(TRenderer));
Hosting.MauiAppBuilderExtensions.CheckForCompatibility();
handlersCollection.AddCompatibilityRenderer<TControlType, TControlType, TRenderer>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" />
<PackageReference Include="Xamarin.Google.Android.Material" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" />
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="118.0.2.2" />
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="118.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
63 changes: 63 additions & 0 deletions src/Controls/samples/Controls.Sample/Pages/AppShell.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Controls;
using System.Collections.Generic;
using System;
using Maui.Controls.Sample.Pages.ShellGalleries;
using System.Linq;

namespace Maui.Controls.Sample.Pages
{
Expand All @@ -10,4 +15,62 @@ public AppShell()
SetTabBarBackgroundColor(this, Color.FromRgba(3, 169, 244, 255));
}
}

public class PageSearchHandler : SearchHandler
{
public IList<Data> Pages { get; set; }
public Type SelectedItemNavigationTarget { get; set; }

public PageSearchHandler()
{
Pages = new List<Data>()
{
new Data(typeof(ShellChromeGallery).Name, typeof(ShellChromeGallery), "dotnet_bot.png"),
new Data(typeof(ButtonPage).Name, typeof(ButtonPage), "books.png"),
new Data(typeof(SemanticsPage).Name, typeof(SemanticsPage), "oasis.jpg"),
};
}

protected override void OnQueryChanged(string oldValue, string newValue)
{
base.OnQueryChanged(oldValue, newValue);

if (string.IsNullOrWhiteSpace(newValue))
{
ItemsSource = Pages;
}
else
{
ItemsSource = Pages
.Where(page => page.Name.ToLower().Contains(newValue.ToLower(), StringComparison.OrdinalIgnoreCase))
.ToList();
}
}

protected override async void OnItemSelected(object item)
{
base.OnItemSelected(item);

var thing = (Data)item;

var result = Shell.Current.Handler.MauiContext.Services.GetService(thing.Type) ??
Activator.CreateInstance(thing.Type);

await Shell.Current.Navigation.PushAsync(result as Page);
}

public class Data
{
public Data(string name, Type type, string imageUrl)
{
Name = name;
ImageUrl = imageUrl;
Type = type;
}

public string Name { get; set; }
public string ImageUrl { get; set; }
public Type Type { get; set; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<MenuFlyout>
<MenuFlyoutItem Text="Increment by 10" Clicked="OnIncrementMenuItemClicked" CommandParameter="10"></MenuFlyoutItem>
<MenuFlyoutItem Text="Increment by 20" Clicked="OnIncrementMenuItemClicked" CommandParameter="20"></MenuFlyoutItem>
<MenuFlyoutItem Text="Increment by 30 (disabled)" Clicked="OnIncrementMenuItemClicked" CommandParameter="30" x:Name="bbb"></MenuFlyoutItem>
<MenuFlyoutItem Text="Increment by 40 (dynamic enabled/disabled)" Command="{Binding DynamicEnabledCommand}" CommandParameter="40"></MenuFlyoutItem>
<MenuFlyoutSubItem Text="More options">
<MenuFlyoutItem Text="Increment by 1,000!" Clicked="OnIncrementMenuItemClicked" CommandParameter="1000"></MenuFlyoutItem>
<MenuFlyoutItem Text="Increment by 1,000,000!" Clicked="OnIncrementMenuItemClicked" CommandParameter="1000000"></MenuFlyoutItem>
Expand All @@ -20,13 +22,18 @@
</FlyoutBase.ContextFlyout>
</Button>
<Label Text="{Binding CounterValue}" FontSize="30" VerticalOptions="Center"></Label>
<Label Padding="0,0,50,0" Text="Is dynamic menu enabled?" FontSize="30" VerticalOptions="Center"></Label>
<Switch IsToggled="{Binding IsDynamicCommandEnabled}" />
</HorizontalStackLayout>

<Label Text="Right-click and add additional menus (currently quirky on Windows and Catalyst)">
<FlyoutBase.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Text="Add Menu" Clicked="OnAddMenuClicked"></MenuFlyoutItem>
<MenuFlyoutSubItem Text="Add Sub Menu" Clicked="OnSubMenuClicked"></MenuFlyoutSubItem>
<MenuFlyoutItem Text="Add top-level menu items" Clicked="OnAddMenuClicked"></MenuFlyoutItem>
<MenuFlyoutSubItem Text="Sub menu items go in here">
<MenuFlyoutItem Text="Add sub menu items below here" Clicked="OnAddSubMenuClicked"></MenuFlyoutItem>
<MenuFlyoutSeparator />
</MenuFlyoutSubItem>
</MenuFlyout>
</FlyoutBase.ContextFlyout>
</Label>
Expand Down
Loading

0 comments on commit 8be6693

Please sign in to comment.