Skip to content

feat(ui): responsive sweep round 2 + flatten updates tab#30

Merged
pachev merged 1 commit into
mainfrom
claude/priceless-cray-44481d
May 23, 2026
Merged

feat(ui): responsive sweep round 2 + flatten updates tab#30
pachev merged 1 commit into
mainfrom
claude/priceless-cray-44481d

Conversation

@pachev
Copy link
Copy Markdown
Owner

@pachev pachev commented May 23, 2026

Closes #26. Closes #20.

What this does

Second-pass responsive sweep through the LiveView page code — picks up the spots that the round-1 component-library work in #25 didn't touch.

Adopt ui_table where raw <table> still lived

  • Settings → SSH Keys (settings_live.ex): handcrafted <table class="table table-zebra">ui_table. The list is small so no pagination; delete button slots cleanly into an unlabeled right-aligned :col.
  • Application detail → Top by memory / Top by message queue (application_live/view.ex): the proc_table private helper was a parallel raw-table implementation. Rewritten to delegate to ui_table with the title in the :action_bar slot. Both call sites pass an explicit id instead of deriving one from the title.

Add sm: breakpoint to page-level 4-stat grids

These were grid-cols-2 lg:grid-cols-4 with no sm: step, so labels wrapped awkwardly at 320–375px:

All three now grid-cols-1 sm:grid-cols-2 lg:grid-cols-4.

Stack-on-xs fixes for grids with no fallback

Adopt ui_kv_table for server settings Connection

server_live/settings_tab.ex: the Connection block was a <dl class="grid grid-cols-2"> inside a ui_card. Replaced with ui_kv_table, which already stacks flex-col sm:flex-row on xs. The "SSH details for this host" subtitle is dropped — consistent with how the Application Info kv_table is used; the title "Connection" inside the Settings tab already provides context.

Anti-patterns we already fixed in ui_*

Two pre-existing instances in page code of patterns that #25 rewrote in the shared components:

  • System snapshot header (application_live/view.ex:106): <header class="flex items-center"> + <span class="flex-1" /> spacer + badge → wrapping flex row with ml-auto on the badge. Same fix as ui_card_title.
  • snapshot_row (application_live/view.ex:155): w-44 shrink-0 label column → flex-col sm:flex-row stacking. Same fix as ui_kv_table.

Flatten Updates tab to match pen design

Not in the original issue checklist but caught during visual review:

server_live/updates_tab.ex wrapped its ui_table inside a ui_card padded={false}, producing a card-inside-a-card with no breathing room on the right edge. Pen frame PFTPt shows the Updates section as a page-level header (title + scan status + badge) above a single bare table card — same shape as the Releases tab. Refactored to match. Empty states stay wrapped in ui_card so ui_empty keeps its frame.

Design-check protocol

Per the issue comment: every change here is either a responsive-breakpoint addition or adoption of a component that already exists in components.pen. No new components introduced, no substantial visual reshapes that needed a pen update first.

Filed #29 for a future ui_table mobile variant (card-stack vs scroll vs priority) — that one IS a new layout primitive and is explicitly blocked on a pen update before any code.

Verification

  • mix precommit clean: compile --warnings-as-errors, deps.unlock --unused, format, credo --strict (no issues), mix test (277 tests, 0 failures)
  • Visual verification with preview_screenshot at 375px viewport: Dashboard, Settings (SSH Keys), Server Settings (Connection), Server Overview, Updates tab, and App detail (snapshot + proc tables). Confirmed at desktop 1280px too for the Updates tab refactor.

Done-when checklist (from issue body)

  • Every checkbox in the issue is either addressed or consciously dismissed
  • No new horizontal-scroll surprises at 375 / 768 / 1024 viewports
  • mix precommit clean

Closes #26.

Adopt ui_table where raw <table> still lived in page code (settings
SSH keys, application top-processes), add sm breakpoints to
page-level 4-stat grids that were stuck at grid-cols-2 (dashboard,
server overview, app detail), and adopt ui_kv_table for the
server-settings Connection block so labels stack on xs instead of
cramping at grid-cols-2.

Rework two anti-patterns that still lived in page code after the
ui_* library was fixed in #25: the flex-1 spacer in the System
snapshot header (now ml-auto on the badge) and the w-44 shrink-0
label column in snapshot_row (now flex-col sm:flex-row).

Also flatten the Updates tab so it matches the pen design (PFTPt)
and the Releases tab pattern: drop the outer ui_card wrapper, lift
'Available Updates' into a page-level section header, let ui_table
be the only card surface. Empty states stay wrapped in ui_card so
ui_empty has a frame.
@pachev pachev merged commit be0b52b into main May 23, 2026
1 check passed
@pachev pachev deleted the claude/priceless-cray-44481d branch May 23, 2026 20:31
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.

Responsive sweep, round 2: non-ui_* page code + adopt ui_table where raw HTML tables remain Replace raw <table> usage with ui_table component

1 participant