Plugin and module logos are drawn wrongly: a module's icon sits in the corner of its tile #901
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#901
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 tiles beside a plugin's or a module's name, on Settings → Plugins and Server settings → Plugins, do not draw correctly.
The cause found so far: a module's icon is not centred in its tile
8fb9459ce(#874) draws a module that declaresManifest.iconas its Lucide icon on a coloured tile._tile(core/templatetags/postulo.py:315-322) puts the<svg>directly inside<span class="avatar …">, atsize-[55%]. Basecoat's centring lives on the inner span only:.avataritself is onlyinline-flex, with noalign-itemsorjustify-content. So the icon sits in the tile's top-left corner instead of in its middle, at 24 px on the settings page and at 32 px on the server page. The initials tiles and the image tiles are not affected, because they go through the inner span and.avatar > img.tests/test_module_icons.pyonly checks the HTML text (data-icon="map"is present), so nothing caught it.What to do
<span>the initials use, so Basecoat centres it, or centre it on the tile. Keep the size as a share of the tile (55 %), so the 24 px and 32 px tiles both look right..avatar > img,object-fit: containsince #291), with a transparent SVG and a non-square PNG, and how the tile's::afterborder, withmix-blend-modedarken or lighten, sits over it;plugin_logo.Done when
svg[data-icon]matches the centre of its.avatartile, and takes a screenshot of a tile with a shipped logo.Checked against
mainat75f31208b.Fixed in
0e6233d9f.