From 1ef48871e30aea11ebd1342b76d2fcb009de441b Mon Sep 17 00:00:00 2001 From: Jad Seifeddine Date: Tue, 13 Oct 2026 13:58:04 +0700 Subject: [PATCH] sessions: move the ad-hoc session form into a modal The ad-hoc session form sat in a collapsible framed box above the session list. It now opens as a modal from a button on the right of the Sessions heading, dropping the page's framed form box inside the dialog, with the primary button first and Cancel at the same height as Connect, matching the other modals. Section headings centre their heading and action button on one line. Part of #254 tests: the ad-hoc session form opens as a modal (cherry picked from commit 872cc61fce4c0d43626bc4b5a9c16af24c8cc656) --- static/rustguac.css | 2 + static/sessions.html | 53 ++++++++++++------- tests/e2e/README.md | 1 + tests/e2e/specs/sessions-adhoc-modal.spec.mjs | 35 ++++++++++++ 4 files changed, 71 insertions(+), 20 deletions(-) create mode 100644 tests/e2e/specs/sessions-adhoc-modal.spec.mjs diff --git a/static/rustguac.css b/static/rustguac.css index 66c8daf..57dcb2e 100644 --- a/static/rustguac.css +++ b/static/rustguac.css @@ -363,6 +363,8 @@ tbody tr:last-child td { border-bottom: none; } padding-bottom: var(--s-2); border-bottom: 1px solid var(--border); } +/* A section's action button sits on the right of its heading band. */ +.section-head .section-action { margin-left: auto; align-self: center; } .section-head strong { color: var(--accent); font-size: var(--fz-sm); diff --git a/static/sessions.html b/static/sessions.html index 5d01d0d..05b337b 100644 --- a/static/sessions.html +++ b/static/sessions.html @@ -46,6 +46,8 @@ font-weight: normal; } .btn-add-hop:hover { background: var(--surface); border-color: var(--accent); } + .adhoc-modal form { background: transparent; border: 0; padding: 0; margin: 0; max-width: none; width: auto; } + .adhoc-modal #new-session-fields { margin-top: 0; } @@ -70,12 +72,12 @@ Use the Connections to connect to saved entries. -