[bug] lint_design not-an-instance matches components with a different icon #16
Reference in New Issue
Block a user
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?
Expected:
not-an-instanceonly flags a frame when swapping to the suggested component would keep its look. Instances can't swap icons, so a frame whose icon differs from the main's shouldn't match.Actual: A chip
Status(14px iconphosphor:image-broken+ 12px label) is flagged asCanal / Telegram(14pxphosphor:telegram-logo+ label). A row withphosphor:phoneis flagged as an event row whose main usesphosphor:check-circle.Repro: create a component
Chip / A=<div style="display:flex;gap:4px;padding:4px 8px"><x-paper-icon name="phosphor:star" size="14"/><div>A</div></div>. Then write the same markup withphosphor:heartoutside a component and runlint_design. It's flagged withswap_instancetoChip / A.Workaround: ignore the warnings. Lint can't reach zero warnings.
Impact: false warnings stay on every lint run and hide real ones. Following the suggested fix would change the icon.
Also: the
fixtext saysswap_instance, but swap_instance refuses non-instance frames ("is not a component instance root"). The fix has to be write_html replace with<x-paper-instance>.Filed from PaperCraft 0.7.2 (macos).