Skip to content

Commit

Permalink
Removed png asset workaround for library projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlodotexe authored and michael-hawker committed Aug 30, 2023
1 parent a869496 commit f3f17ba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CommunityToolkit.App.Shared/Helpers/IconHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace CommunityToolkit.App.Shared.Helpers;

public static class IconHelper
{
internal const string SourceAssetsPrefix = "ms-appx:///SourceAssets/";
internal const string SourceAssetsPrefix = "ms-appx:///";
internal const string FallBackControlIconPath = "ms-appx:///Assets/DefaultControlIcon.png";

public static IconElement? GetCategoryIcon(ToolkitSampleCategory category)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ private ImmutableArray<ToolkitFrontMatter> GatherDocumentFrontMatter(SourceProdu
// Get the filepath we need to be able to load the markdown file in sample app.
var filepath = file.Path.Split(new string[] { @"\components\", "/components/", @"\tooling\", "/tooling/" }, StringSplitOptions.RemoveEmptyEntries).LastOrDefault();
var iconpath = (filepath.Split(new string[] { @"\samples\", "/samples/" }, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault() + "\\samples\\" + icon).Replace('\\', '/');
var iconpath = icon.Replace('\\', '/');
// Look for sample id tags
var matches = MarkdownRegexSampleTag.Matches(content);
Expand Down
5 changes: 0 additions & 5 deletions ProjectHeads/App.Head.props
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@
<Link>SourceAssets/%(RecursiveDir)%(FileName)%(Extension).dat</Link>
</Content>

<Content Include="$(RepositoryDirectory)components\**\samples\**\*.png" Exclude="$(RepositoryDirectory)**\**\samples\obj\**\*.png;$(RepositoryDirectory)**\**\samples\bin\**\*.png;$(RepositoryDirectory)**\SourceAssets\**\*.png">
<Link>SourceAssets/%(RecursiveDir)%(FileName)%(Extension)</Link>
</Content>

<!-- Include markdown files from all samples so the head can access them in the source generator -->
<AdditionalFiles Include="$(RepositoryDirectory)components\**\samples\**\*.md" Exclude="$(RepositoryDirectory)**\**\samples\**\obj\**\*.md;$(RepositoryDirectory)**\**\samples\**\bin\**\*.md"/>
</ItemGroup>
Expand All @@ -104,7 +100,6 @@
<ItemGroup Condition="'$(IsSingleExperimentHead)' == 'true' or '$(IsProjectTemplateHead)' == 'true'">
<!-- These are also included in the Samples props file, but added here to workaround https://github.com/unoplatform/uno/issues/2502 -->
<Content Include="$(MSBuildProjectDirectory)\..\..\samples\**\*.md" Exclude="$(MSBuildProjectDirectory)\..\..\samples\obj\**\*.md;$(MSBuildProjectDirectory)\..\..\samples\bin\**\*.md;$(MSBuildProjectDirectory)\..\..\**\SourceAssets\**\*.md" Link="SourceAssets/%(RecursiveDir)%(FileName)%(Extension)"/>
<Content Include="$(MSBuildProjectDirectory)\..\..\samples\**\*.png" Exclude="$(MSBuildProjectDirectory)\..\..\samples\obj\**\*.png;$(MSBuildProjectDirectory)\..\..\samples\bin\**\*.png;$(MSBuildProjectDirectory)\..\..\**\SourceAssets\**\*.png" Link="SourceAssets/%(RecursiveDir)%(FileName)%(Extension)"/>
<Content Include="$(MSBuildProjectDirectory)\..\..\samples\**\*.xaml" Exclude="$(MSBuildProjectDirectory)\..\..\samples\obj\**\*.xaml;$(MSBuildProjectDirectory)\..\..\samples\bin\**\*.xaml;$(MSBuildProjectDirectory)\..\..\**\SourceAssets\**\*.xaml" Link="SourceAssets/%(RecursiveDir)%(FileName)%(Extension)"/>

<!-- Link/.dat is a workaround for https://github.com/unoplatform/uno/issues/8649 -->
Expand Down

0 comments on commit f3f17ba

Please sign in to comment.