Skip to content

feat(compact): add import arrow icon for grid - #811

Open
llaforest wants to merge 1 commit into
slipx06:mainfrom
llaforest:feat/grid-import-image
Open

feat(compact): add import arrow icon for grid#811
llaforest wants to merge 1 commit into
slipx06:mainfrom
llaforest:feat/grid-import-image

Conversation

@llaforest

@llaforest llaforest commented Mar 17, 2026

Copy link
Copy Markdown

Summary

The compact card grid icon had no directional arrow for import state. Only export had a dedicated icon (gridExportCompact), while both standby (0W) and import (>0W) shared the same plain tower icon (gridOn).
This PR adds a gridImportCompact icon (the directional mirror of gridExportCompact) and splits the condition into three distinct visual states:

  • power > 0 → tower with right-pointing arrow (importing from grid)
  • power = 0 → plain tower, no arrow (standby)
  • power < 0 → tower with left-pointing arrow (exporting to grid)

Changes

  • src/helpers/icons.ts: added gridImportCompact SVG path
  • src/components/compact/grid/grid-elements.ts: split totalGridPower >= 0 condition into === 0 (standby) and > 0 (import)

Test plan

  • Verify import state shows directional arrow pointing toward inverter
  • Verify standby (ill shows plain tower with no arrow
  • Verify export state unchanged
  • Verify custom import_icon config still works (hides built-in icon)
image

- Already an image for grid export
- 0W standby uses a transmission tower with no arrow
- Added an import image with incoming arrow when importing from grid
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