Skip to content

Commit e682e03

Browse files
author
codefl0w
committed
another shrink fix
1 parent ef433f4 commit e682e03

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

assets/css/style.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,14 @@ label {
608608
display: none;
609609
}
610610

611+
.ghb-item-collapsed > .ghb-children {
612+
display: none !important;
613+
}
614+
615+
.ghb-item-open > .ghb-children {
616+
display: block !important;
617+
}
618+
611619
.ghb-selection {
612620
margin-top: 0.85rem;
613621
border: 1px solid #2f3b5e;

gh-boards/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@
166166

167167
const itemEl = document.createElement("div");
168168
itemEl.className = "ghb-item";
169+
if (isFolder) {
170+
itemEl.classList.add(isOpen ? "ghb-item-open" : "ghb-item-collapsed");
171+
}
169172

170173
const rowEl = document.createElement("div");
171174
rowEl.className = `ghb-row ghb-row-${node.type}`;
@@ -201,6 +204,7 @@
201204
const childrenEl = document.createElement("div");
202205
childrenEl.className = "ghb-children";
203206
childrenEl.hidden = !isOpen;
207+
childrenEl.style.display = isOpen ? "block" : "none";
204208
childrenEl.setAttribute("role", "group");
205209
node.children.forEach((child) => {
206210
childrenEl.appendChild(createTreeNode(child, depth + 1, expandAll));
@@ -246,6 +250,9 @@
246250
const nextExpanded = !isExpanded;
247251
rowEl.setAttribute("aria-expanded", String(nextExpanded));
248252
childrenEl.hidden = !nextExpanded;
253+
childrenEl.style.display = nextExpanded ? "block" : "none";
254+
itemEl.classList.remove("ghb-item-open", "ghb-item-collapsed");
255+
itemEl.classList.add(nextExpanded ? "ghb-item-open" : "ghb-item-collapsed");
249256

250257
const twistyEl = rowEl.querySelector(".ghb-twisty");
251258
if (twistyEl) twistyEl.textContent = nextExpanded ? "-" : "+";

0 commit comments

Comments
 (0)