Favicon: replace emoji-text SVG with drawn cloud and add raster fallbacks #61
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
marvin8/yunjin#61
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The favicon (
static/favicon.svg) is a<text>element rendering the ☁️ emoji. It has no artwork of its own — every browser renders it with the visitor's platform emoji font, and clients without SVG favicon support (Safari, older browsers) get nothing usable. There is no ICO or PNG fallback, and/favicon.icoredirects to the SVG, which legacy clients that request it cannot render anyway.A rasterization attempt on a machine without a color emoji font produces a black silhouette, which would lock in the wrong look for everyone — so the icon should be self-contained instead.
The fix: draw the cloud as explicit vector shapes in the app's primary blue (
#0066cc, deuteranopia-safe), generate a multi-sizefavicon.icoand a 180×180apple-touch-icon.pngfrom it, and wire them intobase.htmland the/favicon.icoroute.Findings from exploration
favicon.svgis literally<text>☁️</text>— appearance depends entirely on the viewer's emoji font. Rasterizing it locally (ImageMagick + librsvg) yields a monochrome black silhouette because this box has no color emoji font; committing that would bake in the wrong look.base.html:7links only the SVG;/favicon.ico(web/init.py:143) redirects to the SVG — useless to the legacy clients that request it.TestCloudFaviconWiringin tests/test_web.py (issue #57) — three tests, one asserting the current redirect.--color-primary: #0066cc; blue is deuteranopia-safe.Plan of attack
#0066cc, 128×128 viewBox, transparent background) — replaces the<text>element, making the icon identical everywhere.favicon.ico(16/32/48, transparent) andapple-touch-icon.png(180×180, white background — iOS composites transparency to black) via ImageMagick/librsvg; one-off, committed binaries, no build-time dependency.base.html: add<link rel="icon" type="image/x-icon">and<link rel="apple-touch-icon">after the SVG link./favicon.icoroute: serve the actual ICO file instead of redirecting to the SVG.TestCloudFaviconWiringfirst (template advertises all three links; ICO/PNG served with correct content-types, ICO checked by magic bytes;/favicon.icoreturns 200image/x-icon), watch the new tests fail, then implement.Release-Notes.md(taibai thread) in the user-facing commit.Branch:
feat/favicon-raster-fallbacksCommits:
:white_check_mark: Add failing tests for raster favicon fallbacks:art: Draw cloud favicon as explicit vector art in primary blue:alien: Add ICO and apple-touch-icon raster fallbacksPR: opened via Forgejo API,
feat/favicon-raster-fallbacks→main, body ends withCloses #61, then ci-watch.