Skip to content

Replace the package logo for both packages - #623

Merged
Smaug123 merged 1 commit into
mainfrom
new-logo
Aug 25, 2026
Merged

Replace the package logo for both packages#623
Smaug123 merged 1 commit into
mainfrom
new-logo

Conversation

@Smaug123

Copy link
Copy Markdown
Owner

Vectorises the new reference raster in logos/ with potrace 1.16 (the route the other WoofWare packages took) into a light/dark pair whose only difference is the fill attribute, displays them in the README via <picture>, and packs a 1024x1024 PNG rendering as the PackageIcon of both WoofWare.Myriad.Plugins and WoofWare.Myriad.Plugins.Attributes, which shared the old one.

The readme

The logo was previously a plain Markdown image with a relative path. nuget.org does not resolve relative image paths, so it rendered there as a broken image. It cannot show a <picture> element either: it renders the packed readme through Markdig configured with DisableHtml(), which removes the HTML block parser rather than sanitising, so raw HTML falls through to a paragraph and is escaped — the element would appear as literal tags. So each project's pack writes a copy of the readme with that element removed into its intermediate output directory and packs that, leaving PackageIcon to carry the logo on nuget.org. This is the same mechanism as the other WoofWare packages.

The strip runs as a RoslynCodeTaskFactory inline task rather than through WriteLinesToFile, because that task takes items and MSBuild normalises directory separators in an item spec — which silently rewrote a backslash in a sibling repo's readme. It checks its own postcondition (that no <picture> survived) and fails the pack if the strip did not take, which also makes it safe for the element to grow attributes.

version.json

The logo moves out of the WoofWare.Myriad.Plugins directory, so both version.json path filters have to follow it — the Attributes one named :/WoofWare.Myriad.Plugins/logo.png explicitly, and the Plugins one covered it implicitly through ./. Without the new :/logos/light.png entries, a future logo change would no longer bump either version height.

Verification

  • Both nupkgs differ from the ones main produces only in logo.png becoming light.png; both declare <icon>light.png</icon>.
  • Each packed readme is exactly the readme minus its <picture> element, and rendering it through the same Markdig pipeline nuget.org uses leaves no escaped tags outside code blocks.
  • The destination path resolves correctly both by default (obj/) and under UseArtifactsOutput (artifacts/obj/).
  • The postcondition check was mutation-tested against real packs, per project: breaking one project's strip pattern fails that project's pack while the other still packs, an unclosed element fails both, and both strip <picture class="logo"> correctly.
  • Full suite passes: 1272 tests.

Unrelated observation, not addressed here

<None Include="$(OutputPath)\*.dll" ... /> in WoofWare.Myriad.Plugins.fsproj is a wildcard evaluated at project-evaluation time, before the build populates bin/. Packing a clean checkout therefore produces a package with only WoofWare.Myriad.Plugins.dll under lib/net6.0/, while packing a warm tree produces all ten DLLs. I measured this on main as well as on this branch, so it is pre-existing and unchanged by this PR — but it does mean the package contents depend on the state of the build directory. Happy to fix separately if you want.

Vectorise the new reference raster in `logos/` with potrace 1.16 (the route the
other WoofWare packages took) into a light/dark pair whose only difference is
the `fill` attribute, display them in the README via `<picture>`, and pack a
1024x1024 PNG rendering as the `PackageIcon` of both `WoofWare.Myriad.Plugins`
and `WoofWare.Myriad.Plugins.Attributes`, which shared the old one.

The readme previously showed the logo as a plain Markdown image with a relative
path. nuget.org does not resolve relative image paths, so that rendered there
as a broken image; and it cannot show a `<picture>` element either, because it
renders the packed readme through Markdig configured with `DisableHtml()`,
which removes the HTML block parser rather than sanitising - raw HTML falls
through to a paragraph and is escaped, so the element would appear as literal
tags. So each project's `pack` writes a copy of the readme with that element
removed into its intermediate output directory and packs that, leaving
`PackageIcon` to carry the logo on nuget.org.

The strip runs as a `RoslynCodeTaskFactory` inline task rather than through
`WriteLinesToFile`, because that task takes items and MSBuild normalises
directory separators in an item spec, which silently rewrote a backslash in a
sibling repo's readme. It checks its own postcondition (no `<picture>`
survived) and fails the pack if the strip did not take, which also makes it
safe for the element to grow attributes.

The logo moves out of the `WoofWare.Myriad.Plugins` directory, so both
`version.json` path filters have to follow it: the Attributes one named
`:/WoofWare.Myriad.Plugins/logo.png` explicitly, and the Plugins one covered it
implicitly through `./`. Without the new `:/logos/light.png` entries, a future
logo change would no longer bump either version height.

Verified: both nupkgs differ from the ones `main` produces only in `logo.png`
becoming `light.png`, both declare `<icon>light.png</icon>`, and each packed
readme is exactly the readme minus its `<picture>` element. Rendering that
readme through the same Markdig pipeline leaves no escaped tags outside code
blocks, and the destination path resolves correctly both by default and under
`UseArtifactsOutput`. The postcondition check was mutation-tested against real
packs, per project: each fails an unclosed element and a strip pattern that has
lost its attribute tolerance, while the other project still packs, and both
strip `<picture class="logo">` correctly. Full suite passes (1272 tests).
@Smaug123
Smaug123 enabled auto-merge (squash) August 25, 2026 07:07
@Smaug123
Smaug123 merged commit 2f72be3 into main Aug 25, 2026
20 checks passed
@Smaug123
Smaug123 deleted the new-logo branch August 25, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant