Skip to content

🧪 Bring over StackedNotificationsBehavior from Toolkit #211

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

Merged
merged 21 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6f72098
Merge branch 'feature/settingscard'
Arlodotexe Jul 20, 2022
c1b2619
Merge branch 'fix/labsuitestmethod-generatednames'
Arlodotexe Jul 20, 2022
74f3d48
Merge branch 'llama/canvas-view'
Arlodotexe Jul 20, 2022
8c6590d
Initial StackedNotificationsBehavior ported from https://github.com/C…
vgromfeld Jul 20, 2022
5157b2f
Rev versions on other Experiments to ensure we get a new package with…
michael-hawker Jul 20, 2022
ae5c76f
Make links clickable in Markdown Preview for Docs
michael-hawker Jul 20, 2022
9b86394
Add rescap to manifest for tests (match #226)
michael-hawker Aug 5, 2022
0ce49c3
Update Testspace config based on recommendations from Testspace team
michael-hawker Aug 8, 2022
4205f6e
Switch to Uno Roslyn generators to see if we can avoid Long Path issue
michael-hawker Aug 8, 2022
92ecbc4
Address issue with .NET Native compiler exit code in PR #211
michael-hawker Aug 8, 2022
a6a2c93
Merge branch 'main' of https://github.com/CommunityToolkit/Labs-Windows
Arlodotexe Aug 18, 2022
95cdaad
Merge branch 'main' of https://github.com/CommunityToolkit/Labs-Windows
Arlodotexe Sep 22, 2022
f6ece85
Merge branch 'main' of https://github.com/CommunityToolkit/Labs-Windows
Arlodotexe Oct 11, 2022
c7b9b12
Merge branch 'main' into llama/port-notifications
Arlodotexe Nov 1, 2022
25d891d
Merge branch 'main' of https://github.com/CommunityToolkit/Labs-Windows
Arlodotexe Nov 7, 2022
e10dc9a
Merge branch 'main' of https://github.com/CommunityToolkit/Labs-Windows
Arlodotexe Nov 8, 2022
3c1db1f
Merge branch 'main' into llama/port-notifications
Arlodotexe Nov 8, 2022
7feb812
Added experimental workarounds for ILT0005
Arlodotexe Nov 9, 2022
ea8dd08
Removed "Use64BitCompiler" to combat ILT005
Arlodotexe Nov 17, 2022
c6d23d9
Removed all temporary ILT0005 workarounds
Arlodotexe Nov 17, 2022
4bb8fd1
Moved <UseDotNetNativeToolchain> flag to Uwp.Base.props
Arlodotexe Nov 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,15 @@ namespace CommunityToolkit.Labs.Shared.Renderers;
/// </summary>
public partial class MarkdownTextBlock : ToolkitMTB
{
#if HAS_UNO
//// Polyfill dummy for event callback
#pragma warning disable CS0067 // Unused on purpose for polyfill
public event EventHandler<LinkClickedEventArgs>? LinkClicked;
#pragma warning restore CS0067 // Unused on purpose for polyfill
#endif
}

#if HAS_UNO
//// Polyfill dummy for event callback
public class LinkClickedEventArgs : EventArgs { }
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<DataTemplate x:Key="DocumentTemplate"
x:DataType="x:String">
<renderer:MarkdownTextBlock Background="Transparent"
LinkClicked="MarkdownTextBlock_LinkClicked"
Text="{Binding}"
TextWrapping="WrapWholeWords" />
</DataTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
using CommunityToolkit.Labs.Core.SourceGenerators;
using CommunityToolkit.Labs.Core.SourceGenerators.Metadata;
using Windows.Storage;
using Windows.System;

#if !HAS_UNO
#if !WINAPPSDK
using Microsoft.Toolkit.Uwp.UI.Controls;
#else
using CommunityToolkit.WinUI.UI.Controls;
#endif
#endif

namespace CommunityToolkit.Labs.Shared.Renderers;

Expand Down Expand Up @@ -113,8 +122,12 @@ private async Task LoadData()
index = match.Index + match.Length;
}

// Put rest of text at end
DocsAndSamples.Add(doctext.Substring(index));
var rest = doctext.Substring(index).Trim();
// Put rest of text at end (if any)
if (rest.Length > 0)
{
DocsAndSamples.Add(rest);
}
}
}

Expand Down Expand Up @@ -174,4 +187,30 @@ private static async Task<string> GetDocumentationFileContents(ToolkitFrontMatte
return $"Exception Encountered Loading file '{fileUri}':\n{e.Message}\n{e.StackTrace}";
}
}


#if HAS_UNO
private void MarkdownTextBlock_LinkClicked(object sender, LinkClickedEventArgs e)
{
// No-op - TODO: See https://github.com/CommunityToolkit/Labs-Windows/issues/151
}
#elif !HAS_UNO
private async void MarkdownTextBlock_LinkClicked(object sender, LinkClickedEventArgs e)
{
if (!Uri.IsWellFormedUriString(e.Link, UriKind.Absolute))
{
await new ContentDialog
{
Title = "Windows Community Toolkit Labs Sample App",
Content = $"Link {e.Link} was malformed.",
CloseButtonText = "Close",
XamlRoot = XamlRoot // TODO: For UWP this is only on 1903+
}.ShowAsync();
}
else
{
await Launcher.LaunchUriAsync(new Uri(e.Link));
}
}
#endif
}
2 changes: 1 addition & 1 deletion common/Labs.Head.Uwp.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project>
<Project>
<Import Project="$(RepositoryDirectory)common\Labs.Uwp.Base.props" />
<Import Project="$(RepositoryDirectory)common\Labs.Head.Uwp.Dependencies.props" />

Expand Down
3 changes: 3 additions & 0 deletions common/Labs.Uno.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<ItemGroup Condition="'$(IsUno)' == 'true'">
<PackageReference Include="Uno.UI" Version="4.4.13" />
</ItemGroup>
<PropertyGroup Condition="'$(IsUno)' == 'true'">
<UnoUIUseRoslynSourceGenerators>true</UnoUIUseRoslynSourceGenerators>
</PropertyGroup>

<ItemGroup Condition="'$(IsWasm)' == 'true' OR '$(IsWpf)' == 'true' OR '$(IsGtk)' == 'true'">
<PackageReference Include="Uno.UI.RemoteControl" Version="4.4.13" Condition="'$(Configuration)'=='Debug'" />
Expand Down
9 changes: 4 additions & 5 deletions common/Labs.Uwp.Base.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<IncludeContentInPack>false</IncludeContentInPack>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand Down Expand Up @@ -44,7 +48,6 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
Expand All @@ -69,7 +72,6 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
Expand All @@ -82,7 +84,6 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
Expand All @@ -95,7 +96,6 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
Expand All @@ -120,7 +120,6 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Description>
This package contains a CanvasLayout Layout for ItemsRepeater.
</Description>
<Version>0.0.1</Version>
<Version>0.0.2</Version>
</PropertyGroup>

<!-- XAML Pages are automatically included, and don't need to be specified here. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Description>
This package contains SizerBase.
</Description>
<Version>0.0.2</Version>
<Version>0.0.3</Version>
</PropertyGroup>

<!-- XAML Pages are automatically included, and don't need to be specified here. -->
Expand Down
Loading