-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow customise colors of remotes #12273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds support for customizing remote colors and reorders the URL and Name rows in the FormRemotes dialog. Key changes include:
- Adding methods in GitModule and IGitModule to get and reset remote colors.
- Updating the UI in FormRemotes.cs to support the new remote color feature with proper button behavior.
- Modifying the remote settings save logic and corresponding unit tests to include the optional remote color.
Reviewed Changes
Copilot reviewed 12 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/app/GitCommands/Git/GitModule.cs | Introduces _remoteColors and GetRemoteColors/ResetRemoteColors methods for caching remote colors. |
src/app/GitCommands/Config/SettingKeyString.cs | Adds a new setting key for remote color configuration. |
src/app/GitUI/CommandsDialogs/FormRemotes.cs | Updates the remote configuration dialog to include remote color UI elements and logic. |
src/app/GitCommands/Remotes/ConfigFileRemoteSettingsManager.cs | Enhances SaveRemote and PopulateRemotes to handle the new remote color property. |
tests/app/UnitTests/GitCommands.Tests/Remote/ConfigFileRemoteSettingsManagerTests.cs | Updates unit tests to account for the new remote color parameter. |
Additional files | Various updates to pass the remote colors through to the revision grid UI. |
Files not reviewed (3)
- src/app/GitUI/CommandsDialogs/FormRemotes.Designer.cs: Language not supported
- src/app/GitUI/CommandsDialogs/FormRemotes.resx: Language not supported
- src/app/GitUI/Translation/English.xlf: Language not supported
tests/app/UnitTests/GitCommands.Tests/Remote/ConfigFileRemoteSettingsManagerTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mainly nits, have not run
src/app/GitUI/UserControls/RevisionGrid/Columns/MessageColumnProvider.cs
Outdated
Show resolved
Hide resolved
tests/app/UnitTests/GitCommands.Tests/Remote/ConfigFileRemoteSettingsManagerTests.cs
Outdated
Show resolved
Hide resolved
|
a3274b7
to
f4ce758
Compare
using GitModuleTestHelper moduleTestHelper = new(); | ||
GitModule gitModule = GetGitModuleWithExecutable(_executable, module: moduleTestHelper.Module); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AI output must be checked thrice! When resolving the MCs, it took long until I noticed that this code makes use of _executable
but not of _gitModule
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, some of these tests are special...
I generally work in repos where maintainers tend to use main trunks instead of own forks, which makes repos very busy. Those repos also tend to have several remotes, which often make finding the right branch a daunting task.
Colouring the remotes makes finding the right remote easier.
Proposed changes
Key points:
Screenshots
Before
After
If the color is not set, then only "Set color" button is available:

Once a color for a remote is set, then there is an additional button to reset:

Test methodology
Test environment(s)
Merge strategy
I agree that the maintainer squash merge this PR (if the commit message is clear).
✒️ I contribute this code under The Developer Certificate of Origin.