Skip to content

Conversation

gerhardol
Copy link
Member

@gerhardol gerhardol commented Dec 26, 2023

Proposed changes

CancellationToken for diff calculation not only when
RevDiff updates.

Simplify internal handling with FilterVisible etc

Removed property for FilterVisible as it was always true, used in all lists.

Set property GroupByRevision to true only where needed

Revised taborder, tab to Filter box before list
(other sub controls are not tab enabled).

--
FileStatusList: Delay FileLoading label

Label appears as flickering.
Just clear the FileStatusList while calculating the data.

This is not required, but in most situations the FilesLoading... label is very quick, appears as flickering.
The change is in a separate commit, to simplify rejection.
The first commit hides the Filter Combobox too, maybe better to keep it visible if the FilesLoading label is kept

--
#11350 will require this change

Screenshots

In Linux repo
First two selected commits are f8678a336808f728ea2e0806cfc10362958ca4e5 7beae48301f7ca214939e522051007b9b4daf178
Slower than almost all GE commits, but much faster than third selection 51af5563423c6e8537da8b6bd485b46c2b0d6492 (even if that has a small diff)

Before

prev-list

After

new-list2

Test methodology

Tests are updated

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.

@ghost ghost assigned gerhardol Dec 26, 2023
@RussKie RussKie added the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Dec 29, 2023
@gerhardol gerhardol mentioned this pull request Dec 29, 2023
@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Dec 29, 2023
Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have not reviewed the actual code yet

The gap between Clear and the first group can be very long.
Hence we should rather create a [View]Model or the like and fill it in the background.
The ready-loaded groups can be announced to the UI in single steps.

This will also ease the planned switch to TreeView later and enable a safer implementation of "find in files of diff".

@mstv

This comment was marked as resolved.

@mstv

This comment was marked as off-topic.

@gerhardol
Copy link
Member Author

I could not decide what to do about this, so I let it rest for some weeks (while working on Git coloring).
A summary of the status - really belongs to separate issues and PRs, but I have a branch with all changes (/tmp/git-coloring) that @mstv gives good feedback on. Just mentioning this below.

  • This PR will have more or less the same behavior as now for filterbox and labels (there are some other changes in this PR too). I have squashed the changes and applied updates to first commits of /tmp/git-coloring. Need to fix some tests it seems.
  • Git-coloring requires some refactoring in FileViewer. I will probably want to merge those before git-grep UI as a separate commit (but probably not a separate PR). This includes word highlighting and configuration, to be presented later. Some tests are needed too, maybe in a follow-up PR.
  • git-grep UI is updated, but the label handling is not final. A popup to search is probably a followip PR (serch box is configurable, off by default).

Hopefully this PR can be merged soon at least.

"Loading data..." should be made larger in order to cover the filter & search combobox texts.

Loading is moved below the combo boxes, replacing the list of files as it is now and as asked for in the previous comment #11472 (comment). (I had no good enough motivation to change the behaviour.)

For git-grep I plan to move the search commit to the top, then filter box can be shown if a search is active and NoFiles shown by default if no files in the commit (and no search). This should work with popup to search too.

@mstv

This comment was marked as outdated.

Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mstv

This comment was marked as resolved.

@gerhardol
Copy link
Member Author

FormCommit does not show any diffs with branch tmp/file-status-updates at f89c508.

That is why the test fails. Did not find the issue yesterday.
(FormCommit has some special handling. I had to keep the explicit resizing of the list as canvas for "No files" due to this.)
I do not have many spare hours in the weekdays...

@gerhardol gerhardol force-pushed the feature/file-list-properties branch from f9bf65e to e95f992 Compare February 10, 2024 23:25
@gerhardol
Copy link
Member Author

Finally got to fix the issues, preparing for #11472
Previous commits were squashed, one designer change and one with changes. Can be reviewed as one.

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me

@gerhardol gerhardol force-pushed the feature/file-list-properties branch from 0456cb2 to 6a26cfa Compare February 11, 2024 23:07
@mstv
Copy link
Member

mstv commented Feb 12, 2024

Both issues could be handled in follow-ups:

Resize on hiding the "docked" Process History Panel matters:

image

Wrong diff for split file although the last "git diff" commands seems to be appropriate at first glance (F3 works perfectly):

"C:\Program Files\Git\bin\git.exe" -c color.ui=never -c diff.submodule=short -c diff.noprefix=false -c diff.mnemonicprefix=false -c diff.ignoreSubmodules=none -c core.safecrlf=false -c color.diff.meta="" -c diff.colorMoved=zebra -c diff.colorMovedWS=no -c diff.wordRegex=. -c color.diff.old="#000000 #ffc8c8" -c color.diff.new="#000000 #c8ffc8" diff --find-renames --find-copies --color=always --unified=3 "dd7d03fc44e09df8b870b73db8a9364939459aea" "19a722307d5bed1ac0aeca7a6f4e78e361024cb6" -- "Plugins/GitUIPluginInterfaces/IGitPluginForCommit.cs" "Plugins/GitUIPluginInterfaces/IGitPluginForRepository.cs"

image

@gerhardol
Copy link
Member Author

Both issues could be handled in follow-ups:

Resize on hiding the "docked" Process History Panel matters:

Cannot reproduce this, so dropping for now

Wrong diff for split file although the last "git diff" commands seems to be appropriate at first glance (F3 works perfectly):

This is not related to this PR but to the not yet created git-coloring changes.
The Git output includes two headers compared to before, which was the following:

git -c diff.submodule=short -c diff.noprefix=false -c diff.mnemonicprefix=false -c diff.ignoreSubmodules=none -c core.safecrlf=false diff --find-renames --find-copies --unified=3 "dd7d03fc44e09df8b870b73db8a9364939459aea" "19a722307d5bed1ac0aeca7a6f4e78e361024cb6" -- "Plugins/GitUIPluginInterfaces/IGitPluginForCommit.cs" "Plugins/GitUIPluginInterfaces/IGitPluginForRepository.cs"

This is a bug in Git. It seems like this is caused by -c color.diff.meta="", removing escapes in the header.
Will handle that there, so no PR tonight.

CancellationToken for diff calculation not only when RevDiff updates.

Simplify internal handling with FilterVisible etc

Removed property for FilterVisible as it was always true, used in all lists.

Set property GroupByRevision to true only where needed

Adjust paddings for labels

Designer changes
@gerhardol gerhardol force-pushed the feature/file-list-properties branch from 569c46d to 4f94cb6 Compare February 13, 2024 20:10
@gerhardol
Copy link
Member Author

Squashed with updates in commit message only.
Will merge when build succeeds (OK locally).

The "wrong diff" is fixed in branch tmp/git-coloring

@gerhardol gerhardol merged commit ebc7f90 into gitextensions:master Feb 14, 2024
@gerhardol gerhardol deleted the feature/file-list-properties branch February 14, 2024 20:30
@ghost ghost added this to the vNext milestone Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants