feat(branches): add bulk delete for branch folders
Add a context-menu action to delete all branches in a folder at once. Top-level remote folders are protected and the currently checked-out branch is preserved. The BranchPanel API now includes folder depth to prevent accidental bulk-deletes and summarizes individual failures after processing. UI polish and localization were applied, and the package/version metadata, changelog, and help overlay were updated for the 2026.8.4 release. - Bulk delete with top-level remote protection and failure summaries. - BranchPanel now tracks folder depth and disables unsafe context menus. - Version bump, changelog/help overlay updates, and UI/localization tweaks.
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
onRenameBranch: (branch: GitBranchInfo) => void | Promise<void>;
|
||||
onDeleteBranch: (branch: GitBranchInfo) => void | Promise<void>;
|
||||
onDeleteRemoteBranch: (branch: GitBranchInfo) => void | Promise<void>;
|
||||
onDeleteBranchFolder: (folderName: string, branches: GitBranchInfo[]) => void | Promise<void>;
|
||||
onDeleteBranchFolder: (folderName: string, branches: GitBranchInfo[], depth: number) => void | Promise<void>;
|
||||
onCreateTag: (name: string, message: string) => void | Promise<void>;
|
||||
onDeleteTag: (tag: GitTag) => void | Promise<void>;
|
||||
onPushTag: (tag: GitTag) => void | Promise<void>;
|
||||
@@ -283,7 +283,7 @@
|
||||
async function openFolderContextMenu(event: MouseEvent, folder: BranchFolderRow) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
if (isBusy) return;
|
||||
if (isBusy || (folder.depth === 0 && folder.branches.every((branch) => branch.remote))) return;
|
||||
|
||||
contextFolder = folder;
|
||||
contextMenuX = event.clientX + 2;
|
||||
@@ -324,9 +324,9 @@
|
||||
|
||||
async function deleteContextFolder() {
|
||||
const folder = contextFolder;
|
||||
if (!folder || isBusy) return;
|
||||
if (!folder || isBusy || (folder.depth === 0 && folder.branches.every((branch) => branch.remote))) return;
|
||||
closeBranchContextMenu();
|
||||
await onDeleteBranchFolder(folder.name, folder.branches);
|
||||
await onDeleteBranchFolder(folder.name, folder.branches, folder.depth);
|
||||
}
|
||||
|
||||
async function createContextWorktree() {
|
||||
@@ -584,7 +584,7 @@
|
||||
style={`--branch-indent: ${row.depth * 16}px;`}
|
||||
type="button"
|
||||
onclick={() => toggleBranchFolder(row.id)}
|
||||
oncontextmenu={(event) => openFolderContextMenu(event, row)}
|
||||
oncontextmenu={row.depth > 0 ? (event) => openFolderContextMenu(event, row) : undefined}
|
||||
aria-expanded={isBranchFolderOpen(row.id)}
|
||||
title={`${row.name} (${row.branchCount})`}
|
||||
>
|
||||
|
||||
@@ -1399,6 +1399,17 @@
|
||||
label: "Neu in Gitty",
|
||||
description: "Änderungen seit der letzten veröffentlichten Version und wichtige Neuerungen früherer Releases.",
|
||||
sections: [
|
||||
{
|
||||
id: "changelog-2026-8-4",
|
||||
title: "Version 2026.8.4",
|
||||
summary: "Dieses Release vereinfacht die Verwaltung zusammengehöriger Branches und sorgt für eine einheitlichere, klarere Oberfläche.",
|
||||
steps: [
|
||||
"Lokale und verschachtelte Remote-Branch-Ordner lassen sich über ihr Kontextmenü gesammelt löschen. Der oberste Remote-Ordner wie origin ist geschützt. Der aktuell ausgecheckte Branch bleibt erhalten und einzelne Fehler werden nach Abschluss verständlich aufgeführt.",
|
||||
"Der Compare-Auswahldialog ist vollständig auf Deutsch verfügbar und orientiert sich bei Feldern, Gruppen, Typografie und Dialogflächen am Styling der externen Tools.",
|
||||
"Die Schließen-Schaltflächen der Repository-Tabs sind quadratisch und haben ausgewogenere Abstände sowie deutlichere Hover- und Tastaturfokus-Zustände.",
|
||||
],
|
||||
note: "Der oberste Remote-Ordner wie origin kann nicht gesammelt gelöscht werden. Seine Unterordner können weiterhin gezielt verwaltet werden.",
|
||||
},
|
||||
{
|
||||
id: "changelog-2026-8-3",
|
||||
title: "Version 2026.8.3",
|
||||
@@ -1488,6 +1499,17 @@
|
||||
label: "What's new",
|
||||
description: "Changes since the latest published version and notable additions from earlier releases.",
|
||||
sections: [
|
||||
{
|
||||
id: "changelog-2026-8-4",
|
||||
title: "Version 2026.8.4",
|
||||
summary: "This release simplifies managing related branches and makes the interface more consistent and easier to read.",
|
||||
steps: [
|
||||
"Local and nested remote branch folders can be deleted in one action from their context menu. The top-level remote folder such as origin is protected. The currently checked-out branch is kept, and individual failures are summarized after processing.",
|
||||
"The Compare selector is fully localized in German and now follows the external-tool selectors for fields, groups, typography, and dialog surfaces.",
|
||||
"Repository-tab close buttons are square and have more balanced spacing and clearer hover and keyboard-focus states.",
|
||||
],
|
||||
note: "The top-level remote folder such as origin cannot be deleted in bulk. Its nested folders can still be managed selectively.",
|
||||
},
|
||||
{
|
||||
id: "changelog-2026-8-3",
|
||||
title: "Version 2026.8.3",
|
||||
|
||||
Reference in New Issue
Block a user