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

BranchFilter text was added backwards #10136

Conversation

gerhardol
Copy link
Member

Fixes #9872

Proposed changes

Clearing the dropdown items changed the focus and moved the focus in the textbox to the first position, so next key was added first.

Dropdown was not opened on focus, which made the filter unusable unless you opened the dropdown first (se below).

Cache the function for getting the references with lazy result, to speed up the dropdown.

Still some weird behavior:

  • If you focus away/back the first match in the dropdown is selected also if the dropdown is not shown (same in 3.5)
  • When moving focus away then back to the control all is selected. In 3.5 allt ext was always selected, you had to start typing from scratch. With 4.0 you can click again, but first position in the box is always selected, you have to move with arrows.

This PR is not perfect but it is similar to the 3.5 behavior and I have no WinForms knowledge and I would like to keep it at this.

Test methodology

manual

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.

Dropdown was not opened on focus, which made the filter unusable.

Cache the function for getting the references with lazy result,
to speed up the dropdown.
@ghost ghost assigned gerhardol Aug 6, 2022
@RussKie
Copy link
Member

RussKie commented Aug 7, 2022

Could you please provide an animation/video of the new behaviour?

@RussKie RussKie added the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Aug 7, 2022
@gerhardol
Copy link
Member Author

Could you please provide an animation/video of the new behaviour?

Not much different from now and less weird.

@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Aug 7, 2022
@gerhardol gerhardol added this to the 4.0.0 milestone Aug 7, 2022
@gerhardol
Copy link
Member Author

i9872-branch-reversed

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.

Thank you

@gerhardol
Copy link
Member Author

Will merge this in a batch with other PRs that should be merged and update release/4.0 too.

The implementation just restores 3.5 handling (and some performance improvements), a proper solution should be investigated.

@RussKie
Copy link
Member

RussKie commented Aug 8, 2022 via email

@gerhardol gerhardol merged commit bb9b967 into gitextensions:master Aug 8, 2022
@gerhardol gerhardol deleted the feature/i9872-branch-filter-reversed branch August 8, 2022 19:46
@ghost ghost modified the milestones: 4.0.0, vNext Aug 8, 2022
gerhardol added a commit that referenced this pull request Aug 8, 2022
Dropdown was not opened on focus, which made the filter unusable.

Cache the function for getting the references with lazy result,
to speed up the dropdown.

(cherry picked from commit bb9b967)
@gerhardol gerhardol modified the milestones: vNext, 4.0.0 Aug 20, 2022
gerhardol added a commit to gerhardol/gitextensions that referenced this pull request Aug 28, 2022
The branchfilters from the sidepanel was not applied unless the
filter dropdown contained any items, but the items were not updated
by default since gitextensions#10136, only when needed (dropdown clicked or text typed).

The dropdown was updated async FileAndForget, so 'external' usage was not
always successful. This was a reason why the test
'Filters_should_behave_as_expected' had to be disabled in AppVeyor
(the test still occasionally fails though).
gerhardol added a commit to gerhardol/gitextensions that referenced this pull request Aug 28, 2022
The branchfilters from the sidepanel was not applied unless the
filter dropdown contained any items, but the items were not updated
by default since gitextensions#10136, only when needed (dropdown clicked or text typed).

The dropdown was updated async FileAndForget, so 'external' usage was not
always successful. This was a reason why the test
'Filters_should_behave_as_expected' had to be disabled in AppVeyor
(the test still occasionally fails though).
gerhardol added a commit that referenced this pull request Aug 29, 2022
The branchfilters from the sidepanel was not applied unless the
filter dropdown contained any items, but the items were not updated
by default since #10136, only when needed (dropdown clicked or text typed).

The dropdown was updated async FileAndForget, so 'external' usage was not
always successful. This was a reason why the test
'Filters_should_behave_as_expected' had to be disabled in AppVeyor
(the test still occasionally fails though).
gerhardol added a commit that referenced this pull request Aug 29, 2022
The branchfilters from the sidepanel was not applied unless the
filter dropdown contained any items, but the items were not updated
by default since #10136, only when needed (dropdown clicked or text typed).

The dropdown was updated async FileAndForget, so 'external' usage was not
always successful. This was a reason why the test
'Filters_should_behave_as_expected' had to be disabled in AppVeyor
(the test still occasionally fails though).

(cherry picked from commit caaccf5)
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.

Branches filter keyboard input reversed
2 participants