Skip to content

Clear selection on filter changes#2913

Merged
tlmii merged 1 commit intomicrosoft:mainfrom
tlmii:dev/clear-selection-on-filter
Mar 18, 2024
Merged

Clear selection on filter changes#2913
tlmii merged 1 commit intomicrosoft:mainfrom
tlmii:dev/clear-selection-on-filter

Conversation

@tlmii
Copy link
Copy Markdown
Member

@tlmii tlmii commented Mar 15, 2024

Resolves #2776 by clearing the selection on Resources and Structured Logs when any of the filters change.

For now I did not try to retain the selection on either page if the selected item would still be visible after the filter. That was easy enough on Resources that always has a small non-paged dataset. But not as simple on Structured Logs where the filtered data set might still be extremely large (see #2776 (comment)). For consistency between the pages, I just cleared on both.

We can complete this PR as-is and see if feedback says we should try to maintain selection, or we can decide to do more. But I figured I'd start with this.

Microsoft Reviewers: Open in CodeFlow

@JamesNK
Copy link
Copy Markdown
Member

JamesNK commented Mar 18, 2024

I think this could be improved by only clearing the selection if a filter is added/changed, and not if a filter is removed.

For example:

  • Removing the text filter on resources/structured logs
  • Removing an advanced filter on the structured logs
  • Removing type filter on resources
  • Removing level filter on structured logs

Could do this in a future issue.

@tlmii tlmii merged commit 79239c9 into microsoft:main Mar 18, 2024
@tlmii tlmii deleted the dev/clear-selection-on-filter branch March 18, 2024 05:04
@tlmii
Copy link
Copy Markdown
Member Author

tlmii commented Mar 18, 2024

I think this could be improved by only clearing the selection if a filter is added/changed, and not if a filter is removed.

For example:

  • Removing the text filter on resources/structured logs
  • Removing an advanced filter on the structured logs
  • Removing type filter on resources
  • Removing level filter on structured logs

Could do this in a future issue.

Good call. Filed #2972 to track

@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] The .NET Aspire dashboard resource filter doesn't remove selections

2 participants