feat: make kind chip clickable to filter logs by kind#9803
Open
crackedhandle wants to merge 2 commits intoflutter:masterfrom
Open
feat: make kind chip clickable to filter logs by kind#9803crackedhandle wants to merge 2 commits intoflutter:masterfrom
crackedhandle wants to merge 2 commits intoflutter:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request enables filtering of logs by their kind when tapping on the metadata chips in the logging screen. It introduces an onKindTapped callback to the MetadataChips and MetadataChip widgets, allowing the LoggingController to update the active filter. Feedback was provided to improve the robustness of the filter query by wrapping the kind in quotes to handle spaces and to refine the interactive area of the chips by moving the margin outside of the gesture detector.
Author
|
@kenzieschmoll can you please take a look, and suggest me if any corresponding changes needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9558
Problem
Users reported (via the 2025 DevTools user survey) that clicking on tags
in the log event rows had no effect. There was no way to quickly filter
logs by a specific kind (e.g.
stderr,flutter.error) by clicking onthe kind chip directly.
Solution
Made the kind chip in the log event rows clickable. When a user clicks
on a kind chip, it automatically applies a
k:<kind>filter to the logstable, showing only logs of that kind.
Changes
onKindTappedcallback parameter toMetadataChipswidget in
metadata.dartonTapcallback to the baseMetadataChipclassGestureDetectorandMouseRegionwhenonTapis provided, showing a pointer cursor on hover to indicate it is clickable
_message_column.dart, passed anonKindTappedcallback toMetadataChipsthat callscontroller.setActiveFilter(query: 'k:$kind')when the kind chip is tapped
Behavior
k:<kind>filter to the logs tableonKindTappedis optional, so existingusages of
MetadataChipswithout the callback are unaffectedTesting
Manually tested by:
flutter.frame) in a log rowk:flutter.frameand onlylogs of that kind are shown