Skip to content
This repository was archived by the owner on Nov 2, 2026. It is now read-only.

fix: card height in sections views and SFP ports in narrow cards (0.1.2) - #10

Merged
eizedev merged 1 commit into
mainfrom
fix/card-height
Oct 30, 2026
Merged

eizedev merged 1 commit into
mainfrom
fix/card-height

Conversation

@eizedev

@eizedev eizedev commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Summary

Two layout bugs seen on a real dashboard (sections view, three columns, and on a phone):

  • The card reported a fixed height of three rows to sections views; the trunks spilled over the next card. getGridOptions now returns rows: "auto" (the frontend's LovelaceGridOptions allows it).
  • In a narrow card the SFP ports covered the last copper ports. The panel wraps now: the SFP ports move below when both do not fit; port and device labels no longer widen a port (width: 0; min-width: 100%).

Version 0.1.2. Refs eizedev/ha-managed-switch#37 (grid height part).

Test plan

  • npm run typecheck, npm test, npm run build pass
  • Looked at the card in the demo instance in a sections view at 1500, 900 and 390 px wide (phone): no overlap, SFP ports wrap on the 1930, trunks inside the card
  • Texts in English and German — no new texts
  • CHANGELOG.md updated; README and docs unaffected

🤖 Generated with Claude Code

- getGridOptions asks for rows: auto; the fixed three rows cut off the trunks.
- The SFP ports wrap below the others when the card is too narrow; labels no longer widen a
  port.

Refs #8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eizedev
eizedev merged commit d2d4dce into main Oct 30, 2026
3 checks passed
@eizedev
eizedev deleted the fix/card-height branch October 30, 2026 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant