From 37d2152fcdbf99a2473612fc43ca2d7216be63e9 Mon Sep 17 00:00:00 2001 From: Christoph Brandau Date: Sat, 15 Aug 2026 17:15:13 +0200 Subject: [PATCH] feat(branch-panel): improve context menu positioning and styling This update enhances the context menu for branches and tags by ensuring it fits within the viewport, preventing overflow and improving usability. Additionally, the styling of the branch context menu has been adjusted for better visibility and interaction. - Added dynamic positioning for context menus to avoid overflow - Updated CSS for branch context menu to improve layout and usability - Simplified context menu opening logic for better performance --- src/app.css | 6 ++- src/lib/components/BranchPanel.svelte | 55 +++++++++++++++++---------- 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/src/app.css b/src/app.css index f998837..31a81c4 100644 --- a/src/app.css +++ b/src/app.css @@ -2212,7 +2212,11 @@ box-shadow: 0 18px 50px rgba(0,0,0,0.5); } - .branch-context-menu, + .branch-context-menu { + position: fixed; + max-height: calc(100vh - 16px); + overflow-y: auto; + } .history-context-menu { position: absolute; } .explorer-context-menu, .repo-tab-context-menu { position: fixed; } diff --git a/src/lib/components/BranchPanel.svelte b/src/lib/components/BranchPanel.svelte index c0888e3..18bae37 100644 --- a/src/lib/components/BranchPanel.svelte +++ b/src/lib/components/BranchPanel.svelte @@ -1,5 +1,6 @@