Skip to content

feat(client): dense card-default views for containers and nodes#330

Merged
runleveldev merged 1 commit into
mainfrom
feature/containers-card-view
Jun 3, 2026
Merged

feat(client): dense card-default views for containers and nodes#330
runleveldev merged 1 commit into
mainfrom
feature/containers-card-view

Conversation

@horner
Copy link
Copy Markdown
Member

@horner horner commented Jun 3, 2026

Why

Old wrap was broken:
Screenshot 2026-06-02 at 10 50 45 PM

New look:
Screenshot 2026-06-02 at 10 52 15 PM

The Containers (/sites/:id/containers) and Nodes (/sites/:id/nodes) list pages used wide tables that forced horizontal scrolling and did not fit on mobile. A table is not the best way to organize this data.

What changed

  • Card-default layout: both pages now default to a compact card (one div/Card per row) instead of a wide table. Each card is a single dense row showing the key fields with inline labels — no horizontal scroll.
  • Cards/Table toggle: a segmented toggle in the page header switches between the new card view and the original table, persisted per-page in localStorage (containers:view, nodes:view).
  • Denser containers: the container template is shortened to just its image name+tag (e.g. base:latest), with the full ref available on hover. Edit/Delete share the same line as the metadata instead of taking a full row.
  • Mobile-friendly headers and actions: header buttons (view toggle, Nodes/New container, Import/New node) and per-row Edit/Delete collapse to icon-only below the sm breakpoint with aria-labels, and restore text labels at sm and up.
  • SSH address no longer wraps mid-value (whitespace-nowrap).

Testing

  • vite build passes; no TypeScript errors.
  • Verified in-browser at 360px width: no horizontal scroll and zero overflowing elements on both pages; hostnames/node names fully visible.
  • Desktop dense single-line layout preserved at lg.

Notes

  • The original request mentioned using a "NITRO table" (DataVisNitroGrid from @mieweb/ui/datavis) for the table view. That grid requires the heavyweight datavis engine (and ag-grid-react), which are not installed in this project, so the table view continues to use the existing @mieweb/ui Table. Wiring up the NITRO grid can be a follow-up if we decide to add those dependencies.

Redesign the Containers and Nodes list pages to fix horizontal
scrolling and improve mobile usability.

- Default to a compact card (div-per-row) layout instead of a wide
  table; each card is a single dense row with inline metadata.
- Add a persisted Cards/Table view toggle (localStorage) so the table
  remains available on demand.
- Shorten container template to its image name+tag (full ref on hover).
- Make header and row action buttons icon-only on mobile (with
  aria-labels), restoring text labels at the sm breakpoint.
- Keep SSH host:port from wrapping mid-address.

Verified no horizontal scroll and no overflow at 360px width.
@horner horner requested a review from runleveldev June 3, 2026 03:05
@runleveldev runleveldev merged commit 6978c89 into main Jun 3, 2026
5 checks passed
@runleveldev runleveldev deleted the feature/containers-card-view branch June 3, 2026 12:47
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.

2 participants