-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implement selection of a single branch or author #30
base: master
Are you sure you want to change the base?
Implement selection of a single branch or author #30
Conversation
…election only to a single branch when disabled.
…lection only to a single author when disabled.
3bd8499
to
87482ab
Compare
Thanks for your contribution! I discovered one little issue directly after switching to the new behaviour: |
@rgeorgiev583 what do you think about my annotations? |
@hansu sorry for the belated response (I've been quite busy with work). I like your idea where a single branch is selected using a single click (thus deselecting the previously selected branch) but multiple branches are selected using Ctrl+click (each Ctrl+click would add the highlighted branch to the current selection). Implementing it could enable the removal of the "single selection" mode for branches/authors (as well as the setting for toggling of the "multiple selection" mode). I also think that implementing things this way would resolve the issues which you've discovered (which arise from the "Select Branches/Authors" features not being designed for single selection at all). So I think that there are two ways to proceed:
What do you think? |
No worries, I only wasn't sure if you might missed my comment. My concern is if we switch completely to the new version with "Ctrl+click" (without a setting) that users might think the possibility to select multiple branches is gone. |
@hansu my idea is to re-use the existing user interface and behaviour for the "multiple selection" dropdown widget (with the checkboxes) while defaulting to selection of a single branch when a dropdown entry is clicked. Unfortunately, I think that it would be a bit unintuitive that multiple selection would be performed using Ctrl+click, since checkboxes usually imply multiple selection using a single click on them. However, having a setting to toggle the "multiple selection" mode is enough of a complexity burden already, and I don't like the idea of the contributors to this repo maintaining two separate modes for each one of the "Select Branch" and "Select Author" features. I'm fine with whatever you decide, though. I want this feature to be usable for more people than me :) |
With you PR we already have that complexity with two different methods.
I think this will not increase the complexity much. |
@rgeorgiev583 any updates on this? |
@hansu Hi again! I was busy with things and had totally forgotten about this pull request. I'm sorry about that. I plan on following your recommendations in #30 (comment). Let me ask a few questions to see if I have understood your remarks correctly:
You want me to implement multiple selection using Ctrl+click in the "selection of a single branch or author" mode, is that right?
You want me to preserve the ability to enable multiple selection using a single mouse click (which is the old behaviour), is that right?
If you want the two drop-downs to always behave the same way when it comes to selection, I'd have to unify the two separate
You want me to fix the error message popping up when clicking on "Show All", is that right?
When I implement the Ctrl+click feature in the single selection mode, this won't be a problem anymore since multiple selection would be supported in that mode and there would be checkboxes in the dropdown. Once we have clarified the requirements, I'll sit down to implement them during the weekend. |
Thanks for your quick reaction!
Exactly!
Yes like you already have implemented.
Not sure if we should have the ability so set a different selection mode for branch filter and author filter.
Yes
Yes! |
@rgeorgiev583 just a little reminder ;-) |
Summary of the issue:
A single branch/author cannot be selected from the drop-down with a single click. Currently, a branch/author is added to the selection when clicked, so in order to deselect the previously selected branch/author, it has to be clicked as well. This is annoying when one just wants to switch to another branch/author without bothering with the "multiple selection" feature.
Description outlining how this pull request resolves the issue:
Introduce
selectMultipleBranches
/selectMultipleAuthors
settings which allow the toggling of the "multiple selection" feature for branches/authors. When enabled, make the respective drop-down behave as before. When disabled, restrict branch/author selection to a single entry, effectively implementing switching of branches/authors. Enable both settings by default so that the previous behavior of the drop-downs would be preserved when using the default settings.