feat(ui): responsive sweep round 2 + flatten updates tab#30
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_tablewhere raw<table>still lived<table class="table table-zebra">→ui_table. The list is small so no pagination; delete button slots cleanly into an unlabeled right-aligned:col.proc_tableprivate helper was a parallel raw-table implementation. Rewritten to delegate toui_tablewith the title in the:action_barslot. Both call sites pass an explicitidinstead of deriving one from the title.Add
sm:breakpoint to page-level 4-stat gridsThese were
grid-cols-2 lg:grid-cols-4with nosm: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
Add Servermodal SSH user / Port inputs:grid-cols-2→grid-cols-1 sm:grid-cols-2Adopt
ui_kv_tablefor server settings Connectionserver_live/settings_tab.ex: the Connection block was a
<dl class="grid grid-cols-2">inside aui_card. Replaced withui_kv_table, which already stacksflex-col sm:flex-rowon 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:
<header class="flex items-center">+<span class="flex-1" />spacer + badge → wrapping flex row withml-autoon the badge. Same fix asui_card_title.snapshot_row(application_live/view.ex:155):w-44 shrink-0label column →flex-col sm:flex-rowstacking. Same fix asui_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_tableinside aui_card padded={false}, producing a card-inside-a-card with no breathing room on the right edge. Pen framePFTPtshows 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 inui_cardsoui_emptykeeps 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_tablemobile 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 precommitclean:compile --warnings-as-errors,deps.unlock --unused,format,credo --strict(no issues),mix test(277 tests, 0 failures)preview_screenshotat 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)
mix precommitclean