Take the mark from the core's vector, and show it as one #59

Merged
tiagoagueda merged 1 commit from 1238-vector-mark into main 2026-11-12 12:40:47 +00:00
Owner

Refs postulo/postulo#1238. scripts/icons.py follows the core's new recipe: it reads the core's served logo.svg (checked against its brand.json) and renders the PNGs through the core's own brand.draw and brand.rendered. The extension's pages show icons/postulo.svg; the Firefox build names the SVG for its icons (MDN: SVG accepted there, not in Chromium, crbug 29683) and drops the PNGs it no longer names; the toolbar button keeps PNGs because its grey offline state is a raster set at run time. Icons compared with the old ones at every size: same bounds, cleaner edges. npm test 200, the guard, the build and web-ext lint pass.

🤖 Generated with Claude Code

Refs postulo/postulo#1238. `scripts/icons.py` follows the core's new recipe: it reads the core's served `logo.svg` (checked against its `brand.json`) and renders the PNGs through the core's own `brand.draw` and `brand.rendered`. The extension's pages show `icons/postulo.svg`; the Firefox build names the SVG for its icons (MDN: SVG accepted there, not in Chromium, crbug 29683) and drops the PNGs it no longer names; the toolbar button keeps PNGs because its grey offline state is a raster set at run time. Icons compared with the old ones at every size: same bounds, cleaner edges. `npm test` 200, the guard, the build and `web-ext lint` pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Take the mark from the core's vector, and show it as one
All checks were successful
CI / check (pull_request) Successful in 39s
38c93dff6e
The core now keeps its mark as a vector and renders every PNG it serves from it, drawn by
Chromium; its raster, assets/brand/postulo.png, is gone. scripts/icons.py read that raster,
so it would no longer run, and the extension's icons would keep the old raster's pixels.

scripts/icons.py now takes the core's served logo.svg (refused unless the core's
brand.json records it), draws it with the core's own draw() at the core's master size and
fits each size with the core's rendered(): one recipe, the core's. It finds the core at
../postulo, or wherever --core or POSTULO_CORE says, and runs in the core's environment.
The re-rendered PNGs have the same bounding box at every size as the old ones and look the
same, with cleaner edges.

It also copies that logo.svg to src/icons/postulo.svg, which the popup, the review window
and the captures page now show instead of a 32-pixel PNG, and which the Firefox build names
for every manifest icon size: MDN's manifest.json icons page says Firefox takes SVG ("You
can use SVG, and the browser scales your icon appropriately"), Chromium does not
(crbug.com/29683), so Chromium's manifest keeps the rendered PNGs and the Firefox package
leaves out the ones it no longer names. The toolbar stays PNG in both: its grey offline
state is a raster set at run time, and the button in colour is the same picture.

Refs postulo/postulo#1238

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tiagoagueda deleted branch 1238-vector-mark 2026-11-12 12:40:47 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo-chromium!59
No description provided.