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
Sidepanel submodule improvements #8726
Sidepanel submodule improvements #8726
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8726 +/- ##
==========================================
- Coverage 56.05% 56.00% -0.06%
==========================================
Files 902 903 +1
Lines 65134 65184 +50
Branches 11825 11844 +19
==========================================
- Hits 36513 36507 -6
- Misses 25702 25744 +42
- Partials 2919 2933 +14
Flags with carried forward coverage won't be shown. Click here to find out more. |
builder.Append(items.Count).Append(' '); | ||
|
||
if (items.Count == 1) | ||
{ | ||
builder.AppendLine(singular); | ||
} | ||
else | ||
{ | ||
builder.Append(singular).AppendLine("s"); | ||
} |
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.
var ending = string.Empty;
if (items.Count > 1)
{
ending = "s";
}
builder.AppendFormat("{0} {1}{2}", items.Count, singular, ending)
.AppendLine();
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.
If this is to be changed interpolated string should be used instead
builder.Append($"{items.Count} {singular}{(items.Count == 1 ? "" : "s")}")
.AppendLine();
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.
A new string object will be created every time.
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.
9ecc105
to
4ba1413
Compare
Rebased on master and removed draft, added review comments |
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.
I checked out 4ba1413 but the submodule status didn't seem to work for me:
Did you deactivate when we had performance problems a couple of years ago? |
4ba1413
to
40e4d52
Compare
Rebased after #8734, review comments |
40e4d52
to
b7548f1
Compare
Still valid, #8738 fixed #8726 (comment) |
Any opinions? I find that the tooltip to get the status is something I really missed, I do not have to open the submodules to see expected changes only (like dirty files). |
b7548f1
to
0c8ac29
Compare
Yes, that worked :) |
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.
Since I use submodules rarely, I cannot say much. I will review formally in the next days.
Should the two Open
context menu items have more specific texts? Or do the different icons and tooltips suffice?
English.xlf
needs an update (tooltips).
I guess #8703 was meant instead of #8700 in the PR description.
The new instance could be called "Open with Git Extensions" as it is called in other menus, but I do not believe that is clearer. |
/// <param name="path">path to the module</param> | ||
private void SetModuleAsDirty(string path, bool force = false) | ||
/// <param name="module">the submodule</param> | ||
private void SetModuleAsDirty(GitModule 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.
Why?
Format using interpolated strings
0c8ac29
to
b38b46b
Compare
Closes #8714
Second part of #8703
Based on #8703 that is set to automerge so not to be merged yet. Fully reviewable.
Best reviewed commit by commit
Proposed changes
Review commit by commit.
Several of the changes will be squashed at approval.
Screenshots
Using a testrepo with GE modules recursively added (originally to test performance)
Test methodology
Manual
Mostly UI changes, using already existing
✒️ I contribute this code under The Developer Certificate of Origin.