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
AdvancedFilter: Disable filters button dropdown #9807
AdvancedFilter: Disable filters button dropdown #9807
Conversation
ed2aead
to
aed6b6d
Compare
Changing the icon when a filter is active, I believe this is good enough to indicate that there is a filter |
6141000
to
2b55c11
Compare
What I was thinking is to have in the drop-down a way to disable the one related to the file path because it will be set every time you use the 'file history' feature. And I find it boring to have to open the pop-up every times to disable it. And 'Disable all' could only be used if you don't have other filters that you want to keep (for example the number of commits to retrieve) After that I let you decide if, for homogeneity, we must add every filter in the drop-down. Maybe overkill... |
Adding a special for disabling path filters only. |
Even longer toolbar, but a button with image and tooltip would be shorter. But @pmiossec wanted to have a special for path filters, another for all filters for which a tool strip button is preferred. If that is a requirement I prefer one button for all. |
Yes, I prefer to have at least one specific for path filters because it will be set automatically quite often and so you will have to clear it often. And that some others filters are "long time/permanent filters". For example, I sometimes use the "Since" or "Limit" filter to display less commits and so display and refresh quicker the revision grid in big repositories (as we don't always need the whole history). I don't want to clear these "permanent filters" when I need to quickly clear the path filter. Side note: A "since" filter expressed in number of days instead of a date will be a nice improvement for my use case.... |
One or two buttons for you?
Side note: How big are the repos compared to Linux, how long time to open? |
Not sure but I tend to think only one. Because, with the workflow I explained with a "permanent filter" enabled it won't change anything, you will have to click twice. The difference is that "Clear all filters" will be in one click but I don't think I will use it often (except if I stop using the "permanent filter"). I prefer to test one button during some times to see if it's painful or not but that's not as if I will have to do this action as often as it become painful. Other side note: It is for me much more painful for me to not have 2 dissociated buttons for the fetch and pull (like in all the others git GUIs) and having to click the little arrow if I want to change the action...
Not that big. Around 25k commit. But enough to feel the difference when the filter is enabled especially when my laptop is busy doing something else.
I didn't paid attention to that as I don't run v3.5 but my custom version based on the last commit before switch to .net5 and I didn't used enough the master version to compare.... |
Updated the original proposal but did not overwrite RussKies proposal but pushed to |
I think a strategic solution to the problem would be to use
https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.toolstripcontrolhost,
and move the advanced filter dialog into it. This would probably allow us
to remove the quick path filter too, because the advanced filter will be as
readily available.
PS. I've restarted my efforts in making toolbars movable because even on a
4K screen with user scripts the toolstrip becomes unusably long.
|
I believe my last proposal is sufficient. Maybe the icon when a filter is active can be clearer. |
What is in this branch seems good for me in terms of behavior.... |
I will push this then
Limit, IgnoreCase, CurrentBranchOnlyCheck is ignored in disabling and displaying tooltip. |
I want to try ToolStripControlHost (I had a brush with it as part of work investigations). I think it could be an easy win. |
Completed renaming from Disable filters to Reset filters, that RussKie started with |
68f972a
to
247bb48
Compare
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.
:+1 for the PR
but a few comments
RevisionGridFilter.ShowRevisionFilterDialog(); | ||
if (!tsmiResetAllFilters.Enabled) | ||
{ | ||
RevisionGridFilter.ShowRevisionFilterDialog(); | ||
} | ||
else | ||
{ | ||
tsbtnAdvancedFilter.ShowDropDown(); | ||
} |
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 I will want to edit the advanced filter often, I might not like this extra click. Though for the main use case, it saves aiming the arrow. I am not sure about this. Not requesting a change.
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 expect that if you have a filter, the most likely action is to deactivate it, not modify it.
So the dropdown is shown.
The arrow is a little narrow.
2a909e9
to
66679e2
Compare
@RussKie Any opinions about the PR, is it good-enough like this? |
87147cc
to
4ecd969
Compare
Squash merge tomorrow |
Change Advanced filter to a split button and add "Reset filters" to the dropdown for all and path filters. * To indicate that a filter is active, the "Checked" property can no longer be used. This is indicated with a new icon instead. * Update hotkey for filter related actions Ctrl-F is also used for search, use Ctrl-I instead. Similar for disabling filters (added in master), Ctrl-Shift-F is used for searching files and is adjusted to Ctrl-Shift-I. This PR adds a hotkey for disabling the path filter, set to Ctrl-Shift-H.
A little close to ResetRevisionFilter (for all), but better grammar...
4ecd969
to
710493a
Compare
Part of #9796
Proposed changes
Change Advanced filter to a split button and add "Disable filters"
to the dropdown.
This is indicated with a new icon instead.
Screenshots
Before
After
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.