-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
[HxMultiSelect] filtering and select all #617
[HxMultiSelect] filtering and select all #617
Conversation
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'm sorry, but I misunderstood the intent, we kind of missed each other. I thought we were talking about a new search field inside the dropdown and I didn't notice that you were describing using an existing input for filtering.
We would actually like to teach the component this UX:
In our opinion, the filtering functionality combined with the main input is confusing because the selected items are not visible when filtering.
I am very sorry, but we cannot accept the filtering functionality in this form. If you would still be willing to give your time to rework it into the intended form, we would be very grateful. Otherwise, we will try to move the request higher in the backlog to appreciate the energy put into the functionality and get the filtering into the component sooner.
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor.cs
Show resolved
Hide resolved
@bholbrook Is the PR ready for review now or are you still working on the code? |
@hakenr It's ready to be re-reviewed when you can please :) |
@hakenr I was just wondering if/when this might get a re-review please? |
@bholbrook Sorry for the delay. It is on my TODO list. Hopefully I will get to it today or tomorrow. |
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.
@bholbrook First off, I have to commend the effort you've put into working on changes of this scale. I myself was surprised by the sheer amount of changes, which is partly due to the combination with adding the "select all" feature. This raises a lot of new questions, although I understand that implementing both features together is more efficient.
For now, I've added some inline code comments and have noted the following points (for myself) that need to be addressed. Most of these will require further thought on my part, and some will be discussed with colleagues in our internal design meeting:
-
AllowFiltering
,AllowSelectAll
naming? -
EmptyTemplate
naming. PerhapsFilterEmptyResultTemplate
andFilterEmptyResultText
(with defaults) for easier usage? - SelectAll when filtered - should it select only visible items? Is that what we want?
- Filter-box - should it have a search icon and a clear icon?
-
ClearFilterOnHide
- should the default betrue
? -
OnShown
andOnHidden
- do we even need these parameters? How would anyone use them? -
MultiSelectSettings
-AllowFiltering
,AllowSelectAll
,ClearFilterOnHide
, ?FilterPredicate
? -
SelectAllChanged
- do we even need such anEventCallback
? How would it be used? If so, maybeOnSelectAllChanged
, and it should not have a value. - Missing documentation for new parameters
- Missing demo documentation for new features
- Default "-- select all --" text - do we want those dashes? If so, probably just one on each side?
-
ItemSelectionChanged
- we probably can't use this for the SelectAll scenario, as it would trigger a series ofValueChanged
for each selected item, whereas it might be more appropriate to triggerValueChanged
just once with aList<TValue>
of all items -
InputSize
to be applied to inner filter-input
Looking forward to your thoughts on these points.
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor
Outdated
Show resolved
Hide resolved
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor
Outdated
Show resolved
Hide resolved
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor.cs
Outdated
Show resolved
Hide resolved
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor.cs
Outdated
Show resolved
Hide resolved
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor.cs
Outdated
Show resolved
Hide resolved
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor.cs
Outdated
Show resolved
Hide resolved
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor.cs
Outdated
Show resolved
Hide resolved
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor.cs
Outdated
Show resolved
Hide resolved
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor.cs
Outdated
Show resolved
Hide resolved
@crdo, this is a significant contribution that we shouldn't let sit idle. Could you please take a look at the PR (UX, HTML, API, ...) when you get a chance? Thanks! |
…ocalisation issues
@hakenr In response to your list, these are my thoughts.
|
…erator placement in multiline conditions
…bholbrook/Havit.Blazor into feature/HxMultiSelect-filtering
@hakenr Haha, apparently I made the SelectAllChanged changes in my head! I've pushed them up now. In terms of the SelectAll filtering language, I'm really not sure what to do here. If you have any suggestions I'm happy to make those changes. I'm currently working on the Search/Clear icon. I didn't about having the Search icon there but that's not a bad idea. And the ItemSelectionChanged stuff I haven't yet investigated. It's likely the last thing I'll work on. |
@hakenr I've just pushed up the final changes to your list of suggestions. Also, once this does go in, how long might it be before this gets deployed to NuGet and made available? |
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor
Outdated
Show resolved
Hide resolved
Havit.Blazor.Components.Web.Bootstrap/Forms/Internal/HxMultiSelectInternal.razor
Outdated
Show resolved
Hide resolved
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.
LGTM.
Will do some minor tuning and will merge to master.
Summary of changes
Added filtering capability to the HxMultiSelect component as per Issue 616
Added select all capability to the HxMultiSelect component as per Issue 453
Clicking when unchecked will select all items in the currently filtered list.
Clicking when checked will deselect all items in the currently filtered list.
Clicking a checked item or entering any text into the filter will uncheck the select all.
Manually clicking and selecting all items in the filtered list will not check the select all.