Repository navigation
Open in new tab - #2832
Open
jbm wants to merge 3 commits into
Open
Open in new tab#2832jbm wants to merge 3 commits into
jbm wants to merge 3 commits into
Conversation
Holding Option in the File menu now turns "Open…" into "Open in New Tab…" (⌥⌘O) when a repository window is already open, and the selected repositories are opened as tabs of that window, using the same code path as `gitup -t`. When no repository window is open the alternate is hidden so Option keeps showing "Open…", and if the last repository window is closed while the open panel is up, the repositories are opened in new windows instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The overlay banner shown by GIWindowController was given a fixed frame computed from the window content layout rect at the moment it appeared. When the window gained a tab bar afterwards (for example when another repository is added as a tab, or when the window itself is merged into a tab group), the banner stayed in place and ended up hidden underneath the tab bar. The overlay is now positioned with Auto Layout and pinned to the top of the content view safe area, the same way the help banner in the repository window is, so it follows the titlebar as the tab bar appears or disappears. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Open in New Tab…" was hidden from -validateMenuItem: when no repository window was open, but AppKit had already swapped in the alternate by then, and it swaps in hidden alternates anyway. With only the welcome window open, pressing Option therefore still turned "Open…" into "Open in New Tab…". The item is now updated whenever the number of open documents changes: without a repository window it is hidden and no longer an alternate, so pressing Option keeps showing "Open…". It is restored as the visible Option alternate as soon as a repository window opens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the Option key is held down and there is a repo window open, File > Open turns into Open in New Tab. When selected, it opens the new repo into a new tab in the existing window, rather than opening in a new window.
The reason for this is I always operate in a single, full-screen window for visibility and to ensure I see vertical side by side diffs. This streamlines the workflow so I don't have to repeatedly open in a window, zoom the window, then merge all windows. Hopefully done in a way that is minimally invasive and affects nobody if you don't look for it.
This also revealed a potential bug for other future UI changes where the "viewing 'repo branch'" toast was not relative to the content, and so got shown "under" the tab bar.
I AGREE TO THE GITUP CONTRIBUTOR LICENSE AGREEMENT
As noted in the commit comments, these changes were assisted by Claude Opus 5.5, including app tests that I kept local since there doesn't seem to be an overarching automated test scheme. No offense intended if I missed commentary forbidding AI assisted submissions, and none taken if rejected for same.