Closed viceice closed 3 years ago
Is that a mockup? Maybe with > ^ types? Default to collapsed for all, or only if > a certain number of repos?
it's just a small piece of javascript hooked into dashboard
(function () {
"use strict";
function toggle($tgt, mode) {
$tgt.next().nextUntil(":not(.repo-item)").toggle(mode);
}
try {
$(document).on("click", "#sidebarList > .nav-item", (e) => {
const $tgt = $(e.target).parent();
if ($tgt.is(".repo-item")) {
return;
}
toggle($tgt, "slow");
});
const bkp_generateSidebarLists = generateSidebarLists;
generateSidebarLists = (...args) => {
bkp_generateSidebarLists(...args);
let orgs = $("#sidebarList > .nav-item").not(".repo-item");
if (hashState && hashState.owner) {
orgs = orgs.filter(
(_i, e) => $(e).find("a").data("owner") !== hashState.owner
);
}
toggle(orgs, "fast");
};
} catch (e) {
console.error(`unexpected error`, e);
}
})();
on load it closes all orgs (if not active)
I'm going to archive this repository so that we have conversations in one place. Therefore please create an "App Support" discussion here if this problem or suggestion is still relevant: https://github.com/renovatebot/renovate/discussions
It would be nicht to collapse the orgs on the left as they can grow. So the list is getting pretty big 🙃
Sample Tampermonkey helper. https://github.com/viceice/UserScripts/blob/ba0b24bc9679dfbd6b93c0a334a38f4042c2455d/Renovate.Dashboard.js#L1