Skip to content
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

Removed png asset workaround for library projects #129

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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