diff --git a/apps/desktop/src/lib/commit/StackingCommitCard.svelte b/apps/desktop/src/lib/commit/StackingCommitCard.svelte index c64cccff5..4cc64e965 100644 --- a/apps/desktop/src/lib/commit/StackingCommitCard.svelte +++ b/apps/desktop/src/lib/commit/StackingCommitCard.svelte @@ -75,7 +75,8 @@ files = await listRemoteCommitFiles(project.id, commit.id); } - function toggleFiles() { + function toggleFiles(e?: MouseEvent) { + e?.stopPropagation(); if (!filesToggleable) return; showDetails = !showDetails; diff --git a/packages/ui/src/lib/commitLinesStacking/lineManager.ts b/packages/ui/src/lib/commitLinesStacking/lineManager.ts index 5cf824138..e94f71e0c 100644 --- a/packages/ui/src/lib/commitLinesStacking/lineManager.ts +++ b/packages/ui/src/lib/commitLinesStacking/lineManager.ts @@ -25,57 +25,12 @@ function generateLineData({ line.top.type = 'Upstream'; line.bottom.type = 'Upstream'; line.commitNode = { type: 'Upstream', commit }; - - // If there are local commits we want to fill in a local dashed line - if (localBranchGroups.length > 0) { - line.commitNode.type = 'Local'; - line.top.type = 'Local'; - line.bottom.type = 'Local'; - line.top.style = 'dashed'; - line.bottom.style = 'dashed'; - } }); - let localCommitWithChangeIdFound = false; localBranchGroups.forEach(({ commit, line }) => { line.top.type = 'Local'; line.bottom.type = 'Local'; line.commitNode = { type: 'Local', commit }; - - if (localCommitWithChangeIdFound) { - // If a commit with a change ID has been found above this commit, use the leftStyle - line.top.type = 'LocalShadow'; - line.bottom.type = 'LocalShadow'; - - if (commit.relatedRemoteCommit) { - line.commitNode = { - type: 'LocalShadow', - commit - }; - } - } else { - if (commit.relatedRemoteCommit) { - // For the first commit with a change ID found, only set the top if there are any remote commits - if (remoteBranchGroups.length > 0) { - line.top.type = 'LocalShadow'; - } - - line.commitNode = { - type: 'LocalShadow', - commit - }; - line.bottom.type = 'LocalShadow'; - - localCommitWithChangeIdFound = true; - } else { - // If there are any remote commits, continue the line - if (remoteBranchGroups.length > 0) { - line.top.type = 'LocalRemote'; - line.bottom.type = 'LocalRemote'; - line.commitNode.type = 'LocalRemote'; - } - } - } }); localAndRemoteBranchGroups.forEach(({ commit, line }) => {