-
Notifications
You must be signed in to change notification settings - Fork 736
Allow enabling/disabling filters #8327
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
Allow enabling/disabling filters #8327
Conversation
…change icons, move buttons, add disable/enable all
| { | ||
| <div slot="end"> | ||
| <FluentCounterBadge HorizontalPosition="70" Count="@(ViewModel.Filters.Count)" Appearance="Appearance.Accent"> | ||
| <FluentCounterBadge HorizontalPosition="70" Count="@(ViewModel.Filters.Count(filter => filter.Enabled))" Appearance="Appearance.Accent"> |
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.
There are a lot of filter => filter.Enabled in this code. What about adding EnabledFilters property to the view model, e.g.
public IEnumerable<...> GetEnabledFilters() => Filters.Count(filter => filter.Enabled);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.
We would need to add this to the like 5 view models that contain a filter list. How about this instead?
public static IEnumerable<TelemetryFilter> GetEnabledFilters(this IEnumerable<TelemetryFilter> filters)
{
return filters.Where(filter => filter.Enabled);
}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.
Sure
|
Looks good. Some clean up feedback. |






Description
In the telemetry filter menu, adds checkboxes for each filter like in console logs settings. Only enabled filters are counted in the badge. Enable/disable state is persisted in the the serialized filter.

Used a pause/resume button for the filter dialog (other icon suggestions welcome)

Fixes #4143
Checklist
<remarks />and<code />elements on your triple slash comments?breaking-changetemplate):doc-ideatemplate):