-
Notifications
You must be signed in to change notification settings - Fork 500
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 filtering by resource state and health status, and update the filters based on visible grid items #6925
base: main
Are you sure you want to change the base?
Conversation
…der options by name
src/Aspire.Dashboard/Components/Controls/SelectResourceOptions.razor
Outdated
Show resolved
Hide resolved
{ | ||
private async Task OnAllValuesCheckedChangedInternalAsync(bool? newAreAllVisible) | ||
{ | ||
AreAllVisible = newAreAllVisible; |
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.
Previously this line (and the logic in OnValueVisibilityChangedInternalAsync) was done in the callback but can be done directly in this component before invoking the callback.
What happens if there are a lot of states, resources types and health states? The popup should probably have a maximum height and a scoll bar to handle that situation nicely. |
AllValues="AllResourceTypes" | ||
VisibleValues="VisibleResourceTypes" |
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 not a fan of having the available values and selected these stored in seperate collections. Having them stored seperately was ok when there was just one filter, but now that there are 3 - causing 6 collections - I think it needs to be improved.
Note: I didn't originally write the filtering here
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 collapsed these into one collection each. What do you think now?
src/Aspire.Dashboard/Components/Controls/SelectResourceOptions.razor
Outdated
Show resolved
Hide resolved
Reverted the change. |
…lthstatus # Conflicts: # src/Aspire.Dashboard/wwwroot/css/app.css
Description
Currently, you can filter resources by type, but it would also be useful to filter by health status or by resource state. I extracted the resource filter UI into its own component
ResourceFilters
and convertedSelectResourceTypes
into a component that was more generic and so could be reused for state and health status (SelectResourceOptions
). This also meant other refactoring was necessary, such as creating reusable methodsGet/SetFieldVisibility
from the getter and setter logic previously inAreAllTypesVisible
.Fixes #1190
In a follow-up, we could persist these values in the URL (#3647)
(note that, for example, finished and no state have disappeared from available options because no resource with those values is in the grid anymore)
Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):Microsoft Reviewers: Open in CodeFlow