Skip to content
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

prevent flickering when selecting files in staged/unstaged FileStatusList #7267

Merged

Conversation

mdonatas
Copy link
Contributor

@mdonatas mdonatas commented Oct 8, 2019

Fixes #7266

Proposed changes

  • It appears that first item in staged/unstaged file status list should be selected only if Entering the control by keyboard as when using the mouse you either click on specific item to select it or on an empty space to deselect everything
  • Add overridden Enter event to FileStatusList which would provide extra details as to how control was entered
  • Only select first item if control wasn't entered by mouse

Test methodology

  • Manual testing

@ghost ghost assigned mdonatas Oct 8, 2019
@codecov
Copy link

codecov bot commented Oct 8, 2019

Codecov Report

Merging #7267 into master will decrease coverage by <.01%.
The diff coverage is 88.88%.

@@            Coverage Diff            @@
##           master   #7267      +/-   ##
=========================================
- Coverage   48.01%     48%   -0.01%     
=========================================
  Files         747     748       +1     
  Lines       54807   54819      +12     
  Branches     7146    7148       +2     
=========================================
+ Hits        26316   26318       +2     
- Misses      27081   27084       +3     
- Partials     1410    1417       +7
Flag Coverage Δ
#production 37.01% <88.88%> (-0.01%) ⬇️
#tests 97.68% <ø> (ø) ⬆️

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.

LGTM

GitUI/UserControls/FileStatusList.cs Outdated Show resolved Hide resolved
GitUI/UserControls/FileStatusList.cs Outdated Show resolved Hide resolved
GitUI/UserControls/FileStatusList.cs Outdated Show resolved Hide resolved
@RussKie
Copy link
Member

RussKie commented Oct 9, 2019

To confirm - if use tab to cycle between controls, we don't get flickering, do we?

@mdonatas mdonatas force-pushed the prvent-formcommit-diff-flicker branch from 76437bf to acf2fe0 Compare October 9, 2019 16:18
{
if (m.Msg == NativeConstants.WM_MOUSEACTIVATE)
{
_mouseEntered = !Focused;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed this from simply true to !Focused as if you'd click on a list a second time this would get set to true and would remain so as Enter would not fire and this would not get reset to False.
Found this after some more manual testing.

@mdonatas
Copy link
Contributor Author

mdonatas commented Oct 9, 2019

To confirm - if use tab to cycle between controls, we don't get flickering, do we?

We don't with this fix and we didn't as when you'd tab around the first item gets selected so even if it used to flicker technically it wasn't visible as it'd flicker between the same item.

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 like a charm.
All your comments have been addressed, @RussKie.

@RussKie RussKie merged commit 8180276 into gitextensions:master Oct 13, 2019
@ghost ghost added this to the 3.3 milestone Oct 13, 2019
@mdonatas mdonatas deleted the prvent-formcommit-diff-flicker branch October 27, 2019 19:12
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.

Flickering in FormCommit when selecting not the first item in Staged/Unstaged
3 participants