Repository navigation
Conversation
Merged
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.
What this changes
Several repositories can be open at once, each in its own tab. The tab bar sits above the toolbar: click a tab to switch,
×to close it,+for a new tab with the start screen (open, clone, create, recent). Opening a repository that is already open switches to its tab instead of opening it twice. A tab you switch to reloads, so it shows what changed while it was out of sight. Closing a tab shows the one that takes its place, and closing the last one brings back the start screen.The open tabs and the tab on screen are saved with the recent repositories and open again on the next run; a path on the command line opens in a tab next to them. Settings from earlier versions (no tabs saved yet) still reopen the last repository.
The toolbar loses its
Open…button and the repository name, since the+tab and the tab label do that now. Opening a path that is not a repository now always shows the error on the start screen; before,Open…in the toolbar failed without a word. The start screen's path field is emptied once a repository opens, so the next new tab starts clean.How it is tested
Five new tests in
crates/app/src/tests.rsdrive the window through the accessibility tree against real repositories:open_several_repositories_in_tabs: open two, switch back by clicking the first tabopening_a_repository_that_is_open_shows_its_tab: no duplicate taba_tab_shows_what_changed_while_it_was_out_of_sight: a commit made outside the app shows on switchingclosing_tabs_shows_the_next_and_then_the_start_screen: closing the middle, first and last tabtabs_open_again_on_the_next_run: save, restore with and without a path on the command lineAlso tried on a Linux desktop: two tabs, switching, closing, and quitting and starting again without arguments reopened both tabs with the right one active. The screenshot in the README now shows the tab bar.
cargo fmt --all,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspacepass