feat(admin): two-column block layouts for sparse full-width admin screens (BUNYIP-415) #412
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/BUNYIP-415-admin-two-column-layouts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Closes BUNYIP-415. Sparse full-width admin screens now use a shared two-column block layout that collapses to one column on narrow viewports, so wide screens use the available width and group related settings into blocks instead of one long narrow column.
Shared helper (bunyip-web/src/views/layout.rs)
admin_block(title, subtitle, body)- one settings/content block as a card, matching the inline card markup already used across admin.admin_block_grid(blocks)- lays blocks in a responsive grid: two columns atlg, one column below, top-aligned (items-start),gap-6to match the single-column rhythm.Applied
lg.Every grid uses
lg:grid-cols-2, so narrow viewports keep the original single column with no horizontal overflow.Tests
admin_block_grid_is_responsive_two_column- the grid emitslg:grid-cols-2and renders each block + subtitle.email_screen_uses_two_column_blocks/auto_ban_screen_uses_two_column_blocks- the content functions render as responsive two-column grids and preserve every field after regrouping (the SSR analog of a wide/narrow visual-regression check).just check-containergreen (fmt + clippy -D warnings + build + full workspace tests).Verification (live stack, screenshots shared in-thread)
Captured each converted screen at wide (1440px) and narrow (560px):
🤖 Generated with Claude Code
https://claude.ai/code/session_01LerAorB26HGHLfjC9iDUbd