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

Fixes #8146 "Keyboard navigation : Enter Key should open a recent repository" #8537

Conversation

lhiginbotham
Copy link
Contributor

Fixes #8146 "Keyboard navigation : Enter Key should open a recent repository"

Proposed changes

  • intercept "Enter" key event and attempt to open the selected repository, if anything is selected

Test methodology

  • I've attempted to use the enter key in a variety of scenarios, including when there is no repository selected, when there is a repository selected, when there is no repository selected but the list group is collapsed, and when there is a repository selected but the list group is collapsed
    • Out of these scenarios, there seems to be an issue only when pressing enter when a repository is selected but the list group is collapsed. Since the list group was collapsed, I would have expected a no-op, since we cannot visually tell what repository is selected. I cannot fix this, however, as it seems like the ListViewGroup.CollapsedState property is not accessible (maybe we need to use a newer version of .NET in order to see the API implemented and exposed in this WinForms PR? @RussKie )

Test environment(s)

  • Windows 10

✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned lhiginbotham Oct 10, 2020
@codecov
Copy link

codecov bot commented Oct 10, 2020

Codecov Report

Merging #8537 into master will decrease coverage by 0.05%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #8537      +/-   ##
==========================================
- Coverage   55.10%   55.04%   -0.06%     
==========================================
  Files         901      901              
  Lines       65050    65055       +5     
  Branches    11726    11727       +1     
==========================================
- Hits        35844    35812      -32     
- Misses      26474    26480       +6     
- Partials     2732     2763      +31     
Flag Coverage Δ
#production 41.98% <0.00%> (-0.07%) ⬇️
#tests 94.80% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@RussKie
Copy link
Member

RussKie commented Oct 11, 2020

  • it seems like the ListViewGroup.CollapsedState property is not accessible

Yes, the ListView control was enhanced in .NET 5.0, so we'll have access to new features when we upgrade.

  • Out of these scenarios, there seems to be an issue only when pressing enter when a repository is selected but the list group is collapsed.

I suppose we can live with that until we upgrade to .NET 5.0.
The only thing I'd suggest is adding a comment in the code noting this behaviour.

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.

🚀

@RussKie RussKie added the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Oct 11, 2020
@lhiginbotham lhiginbotham force-pushed the lhiginbotham/enter-to-open-repository branch from 5d3c8c6 to e073715 Compare October 20, 2020 11:45
@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Oct 20, 2020
@lhiginbotham
Copy link
Contributor Author

@RussKie I've added the comment

@RussKie RussKie merged commit f5782e7 into gitextensions:master Oct 20, 2020
@ghost ghost added this to the 4.0 milestone Oct 20, 2020
@RussKie
Copy link
Member

RussKie commented Oct 20, 2020

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keyboard navigation : Enter Key should open a recent repository
2 participants