Fix grid column misalignment caused by hidden expand button
display:none removes element from grid flow, shifting other columns. Use visibility:hidden instead so the expand button always holds its cell. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -346,10 +346,10 @@ function make_entry_row(entry, children_map) {
|
||||
row.dataset.priority = entry.priority;
|
||||
row.dataset.status = entry.status;
|
||||
|
||||
// Expand button — hidden in flat mode
|
||||
// Expand button — invisible in flat mode or when no children
|
||||
const expand_btn = row.querySelector('.btn-expand');
|
||||
if (!state.flat_mode && children.length > 0) {
|
||||
show(expand_btn);
|
||||
expand_btn.style.visibility = 'visible';
|
||||
expand_btn.textContent = state.expanded.has(entry.id) ? '▼' : '▶';
|
||||
expand_btn.addEventListener('click', () => {
|
||||
if (state.expanded.has(entry.id)) { state.expanded.delete(entry.id); }
|
||||
|
||||
@@ -198,6 +198,7 @@ main { padding: 1.25rem; }
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
visibility: hidden;
|
||||
}
|
||||
.btn-expand:hover { color: #aaa; background: #333; }
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!-- Entry list item -->
|
||||
<template id="t-entry-row">
|
||||
<div class="task-row">
|
||||
<button class="btn-expand" hidden></button>
|
||||
<button class="btn-expand"></button>
|
||||
<div class="task-meta">
|
||||
<div class="entry-type-chip" hidden></div>
|
||||
<span class="task-id"></span>
|
||||
|
||||
Reference in New Issue
Block a user