Describe the bug
The community panel sidebar previously had Hide All and Show All buttons above the community list. These no longer appear in the generated graph.html.
Individual community toggling (click to hide/show a single community) still works, but there's no way to quickly hide/show all communities at once.
Steps to reproduce
- Run
graphify on any corpus
- Open
graphify-out/graph.html
- Look at the right sidebar → Communities section
- No bulk hide/show controls are present
Expected behavior
Buttons (or a toggle) above the community list to hide all or show all communities in one click — useful when the graph has many communities and you want to isolate a specific one by hiding everything first.
Local patch
I patched export.py locally to restore this. The fix is minimal:
_html_styles() — add styles for #legend-controls:
#legend-controls { display: flex; gap: 6px; margin-bottom: 8px; }
#legend-controls button { flex: 1; background: #2a2a4e; border: 1px solid #3a3a5e; color: #ccc; font-size: 11px; padding: 4px 6px; border-radius: 4px; cursor: pointer; }
#legend-controls button:hover { background: #3a3a6e; color: #fff; }
HTML template — add buttons before <div id="legend">:
<div id="legend-controls">
<button onclick="toggleAllCommunities(false)">Show All</button>
<button onclick="toggleAllCommunities(true)">Hide All</button>
</div>
_html_script() — add function after the LEGEND.forEach block:
function toggleAllCommunities(hide) {
const items = legendEl.querySelectorAll('.legend-item');
LEGEND.forEach((c, i) => {
if (hide) { hiddenCommunities.add(c.cid); items[i].classList.add('dimmed'); }
else { hiddenCommunities.delete(c.cid); items[i].classList.remove('dimmed'); }
});
const updates = RAW_NODES.map(n => ({ id: n.id, hidden: hide }));
nodesDS.update(updates);
}
Happy to open a PR with this if that would help.
Environment
- graphifyy version: latest (pipx install)
- Platform: macOS 24.6.0
Describe the bug
The community panel sidebar previously had Hide All and Show All buttons above the community list. These no longer appear in the generated
graph.html.Individual community toggling (click to hide/show a single community) still works, but there's no way to quickly hide/show all communities at once.
Steps to reproduce
graphifyon any corpusgraphify-out/graph.htmlExpected behavior
Buttons (or a toggle) above the community list to hide all or show all communities in one click — useful when the graph has many communities and you want to isolate a specific one by hiding everything first.
Local patch
I patched
export.pylocally to restore this. The fix is minimal:_html_styles()— add styles for#legend-controls:HTML template — add buttons before
<div id="legend">:_html_script()— add function after theLEGEND.forEachblock:Happy to open a PR with this if that would help.
Environment