Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: the agents page uses more of the width with an agent selected

With a selected agent the shell's 90em column left a wide screen mostly
empty. The page now raises that cap to 160em while two columns are
showing, and the details take three parts to the list's one (the list keeps
at least 24em). The cap and the columns move with the same easing.
This commit is contained in:
iris 2026-11-22 21:27:37 +01:00 • committed by mara
commit 6a18bf1e02

View file

@ -1,10 +1,11 @@
/* <AgentsLayout>: the list and the details of the selected agent.
Two columns, always, so the widths can animate: the details' column goes from
`0fr` to twice the list's, and the gap opens with it. A grid animates between
two track lists of the same shape, and `minmax(0, …)` keeps a long line from
stretching a column. The list is a third of the page (about 28em at the
widest), enough for a card's badges and menu; a card's message is one line. */
`0fr` to three times the list's share, and the gap opens with it. A grid
animates between two track lists of the same shape, and `minmax(…, …fr)`
keeps a long line from stretching a column. The list never gets narrower than
24em, enough for a card's badges and menu; a card's message is one line, and
on a wide screen the details take the rest. */
.agents-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 0fr);
@ -15,9 +16,20 @@
column-gap 320ms cubic-bezier(0.3, 0.7, 0.2, 1);
}
.agents-layout-selected {
grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
grid-template-columns: minmax(24em, 1fr) minmax(0, 3fr);
column-gap: 1.25em;
}
/* The list alone keeps the shell's 90em column. With an agent selected the page
has two columns to fill, so the cap goes up to 160em and the page spreads over
a wide screen instead of leaving it empty at the sides. The cap moves with the
same easing as the columns. */
.shell-body:has(.agents-layout) {
transition: max-width 320ms cubic-bezier(0.3, 0.7, 0.2, 1);
}
.shell-body:has(.agents-layout-selected) {
max-width: 160em;
}
.agents-layout-list {
min-width: 0;
}
@ -81,18 +93,23 @@
preference, the explicit "reduce", then the explicit "allow" over an OS
"reduce". */
@media (prefers-reduced-motion: reduce) {
.shell-body:has(.agents-layout),
.agents-layout,
.agents-layout-details,
.agents-layout-selected .agents-layout-details {
transition: none;
}
}
:root[data-motion="reduce"] .shell-body:has(.agents-layout),
:root[data-motion="reduce"] .agents-layout,
:root[data-motion="reduce"] .agents-layout-details,
:root[data-motion="reduce"] .agents-layout-selected .agents-layout-details {
transition: none;
}
@media (min-width: 60.01em) {
:root[data-motion="allow"] .shell-body:has(.agents-layout) {
transition: max-width 320ms cubic-bezier(0.3, 0.7, 0.2, 1);
}
:root[data-motion="allow"] .agents-layout {
transition:
grid-template-columns 320ms cubic-bezier(0.3, 0.7, 0.2, 1),