feat: sync multiselect of branches and tags with commit list #2020
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.
See #2004
Old Behavior: If one branch is selected in the sidebar, the respective commit was selected in the commit list.
New Behavior: All selected branches or tags are synced to the commit list enabling branch diffing by selecting the branches in the sidebar.
Further details: To keep the change focused I didn't rework the sidebar further to also allow selecting tags and branches across the "groups" (e.g. selecting a tag and a branch). This could be a second extension.
I tried to follow the existing principles how the components and viewmodels already communicate between them. Architecturally the selection could be synced better via managing a central observable collection to which all components contribute their selections. But that's not how SourceGit currently works. I didn't want to rework too much but focus on the feature.
Not perfect, but definitely a improvement.
Demo:
SourceGit_u39iBWabEW.mp4