From f5c8bcfb90d3befece862f58f9a94c25022953f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Sat, 31 Oct 2026 14:42:18 -0300 Subject: [PATCH] fix: Kanban panels keep their size; their lists scroll inside MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Creating users, machines or orders no longer changes the screen: Pessoas and the Tiny log have a fixed height, Máquinas shows two and scrolls, Pagamentos fills the window, Números' machines and treated art scroll in their panels, and the board fills the window with each column scrolling under its head. On the phone the pages scroll as before. Co-Authored-By: Claude Opus 5.5 --- web/kanban.css | 32 ++++++++++++++++++++++++++++++-- web/kanban.html | 10 +++++----- web/kanban.js | 4 ++-- 3 files changed, 37 insertions(+), 9 deletions(-) diff --git a/web/kanban.css b/web/kanban.css index 2186c42..c9b8cd5 100644 --- a/web/kanban.css +++ b/web/kanban.css @@ -591,7 +591,7 @@ label.fopt{cursor:pointer;user-select:none} .phead h2{margin:0;font-size:15px;font-weight:650} .phead .n{font-size:13px;color:var(--tx3)} .phead .hint{color:var(--tx3);display:flex;cursor:help} -.phint{margin:0;padding:12px 18px 0;font-size:13px;color:var(--tx2)} +.phint{margin:0;padding:12px 18px;font-size:13px;color:var(--tx2)} .pfilters{margin-left:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap} .inp.sm{height:34px;width:auto;font-size:13px} .inp.num{width:110px} @@ -771,7 +771,7 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .pill.info,.pill.accent,.pill.muted{color:var(--tx2)} /* Máquinas: one tile each, its metres open, its orders by stage, who is on it. */ -.mtiles{display:grid;grid-template-columns:1fr;gap:1px;background:var(--ln);border-top:1px solid var(--ln);margin-top:12px} +.mtiles{display:grid;grid-template-columns:1fr;gap:1px;background:var(--ln)} .mtile{padding:18px;display:flex;flex-direction:column;gap:12px;background:var(--sf)} .mtile.off>*:not(.row:first-child){opacity:.6} .mtile .row{display:flex;align-items:center;gap:10px} @@ -788,6 +788,28 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .mtile ul b{margin-left:auto;font-weight:600;color:var(--tx)} .mtiles .emptystate{background:var(--sf)} +/* Lists never change the page's size: a panel keeps its height and its + list scrolls inside, however many users, machines or orders there are. */ +.scrollbox{overflow:auto;min-height:0} +.scrollbox thead th,.scrollin thead th{position:sticky;top:0;z-index:1;background:var(--sf)} +.scrollbox.people{height:366px} +.scrollbox.log{height:440px} +.paypanel{display:flex;flex-direction:column;height:calc(100vh - 72px - 24px - 36px - 20px - 40px);min-height:360px} +.paypanel .scrollbox{flex:1} +/* A list that takes the panel's leftover height and scrolls in it, without + making the row taller: the row's other panels set its height. */ +.fill{position:relative;flex:1 1 auto;min-height:460px} +.fill.short{min-height:186px} +.fill>.mtiles,.fill>.scrollin{position:absolute;inset:0;overflow:auto;margin:0} +.fill>.mtiles{border-top:1px solid var(--ln);align-content:start} +.panel:has(> .fill){display:flex;flex-direction:column} +.cols2.lean{align-items:stretch} +/* The board fills the window; each column scrolls on its own, its head stays. */ +#tab-board:not([hidden]){display:flex;flex-direction:column;height:calc(100vh - 72px)} +#tab-board .board{flex:1;min-height:0;align-items:stretch;overflow-y:hidden} +#tab-board .col{min-height:0;overflow-y:auto;padding-top:0;overscroll-behavior:contain} +#tab-board .colhead{position:sticky;top:0;z-index:3;background:var(--lane);margin:0 -8px;padding:14px 16px 8px} + /* Phone (redesign, step 8): the sections in a bar at the bottom, the search behind a button, one stage of the board at a time, the order and the dialogs over the whole screen. */ @@ -885,5 +907,11 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .tall{width:100%;max-height:60vh} .plegend{margin-left:0;flex-basis:100%;order:3} .mchoices{grid-template-columns:1fr} + #tab-board:not([hidden]){display:block;height:auto} + #tab-board .col{overflow:visible} + #tab-board .colhead{position:static;margin:0;padding:2px 2px 4px} + .scrollbox.people,.scrollbox.log,.paypanel{height:auto} + .fill{min-height:0} + .fill>.mtiles,.fill>.scrollin{position:static} } @keyframes sheetUp{from{transform:translateY(40px);opacity:.4}} diff --git a/web/kanban.html b/web/kanban.html index 726db1d..d270af9 100644 --- a/web/kanban.html +++ b/web/kanban.html @@ -122,11 +122,11 @@

Metros por dia

Por máquina

-
MáquinaImpressoPor horaAgora
+
MáquinaImpressoPor horaAgora

Por origem

OrigemPedidosMetrosRecebidoAté Finalizado

Artes tratadas, por quem aprovou

-
+

Retrabalho

@@ -144,21 +144,21 @@

Pessoas

Ativo agoraInativoNunca entrouDesativado
-
NomePerfilMáquina agoraÚltimo acessoEditar
+
NomePerfilMáquina agoraÚltimo acessoEditar

O que cada perfil faz

fazsó consulta

Máquinas

Cada pedido vai para a máquina do produto com menos metros em aberto, dentro do limite. No pedido dá para trocar.

-
+
diff --git a/web/kanban.js b/web/kanban.js index 6d569dc..bf601d4 100644 --- a/web/kanban.js +++ b/web/kanban.js @@ -2592,8 +2592,8 @@ function renderIssues(){ tbody.append(tr); } table.append(thead,tbody); - const panel=node('div',undefined,'panel clip'); - panel.append(table,pager({page:issuePage,size:issueSize,total:issueTotal,noun:'pagamentos', + const panel=node('div',undefined,'panel clip paypanel'),scroll=node('div',undefined,'scrollbox');scroll.append(table); + panel.append(scroll,pager({page:issuePage,size:issueSize,total:issueTotal,noun:'pagamentos', onPage:n=>{issuePage=n;loadIssues().catch(e=>say(e.message,true));}, onSize:n=>{issueSize=n;issuePage=1;loadIssues().catch(e=>say(e.message,true));}})); $('payments').replaceChildren(tools,panel);