Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Property Editor] Add filters for set and default values#9083

Merged
elliette merged 6 commits intoflutter:masterfrom
elliette:issue-8955-button
Apr 2, 2025
Merged

[Property Editor] Add filters for set and default values#9083
elliette merged 6 commits intoflutter:masterfrom
elliette:issue-8955-button

Conversation

@elliette
Copy link
Member

Fixes #8955

Follow up to #9022

Adds a button to the filter input that opens the filter dialog with two options:

  1. Filter to only set values
  2. Filter to only default values
Screenshot 2025-03-28 at 2 06 16 PM Screenshot 2025-03-28 at 2 05 53 PM

@elliette elliette requested a review from a team as a code owner March 31, 2025 20:55
@elliette elliette requested review from kenzieschmoll and removed request for a team March 31, 2025 20:55
/// the filter state.
class FilterDialog<T> extends StatefulWidget {
FilterDialog({super.key, required this.controller})
: assert(controller.queryFilterArgs.isNotEmpty),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was throwing an assert error, and as far as I can tell we are not expecting the queryFiltersArgs to be non-empty anywhere in this widget.

@kenzieschmoll
Copy link
Member

I can see why a user might want to see only properties that are set, but what is the use case where a user would only want to see properties that are set to the default value?

@elliette
Copy link
Member Author

elliette commented Mar 31, 2025

I can see why a user might want to see only properties that are set, but what is the use case where a user would only want to see properties that are set to the default value?

I think this is mostly useful in conjunction with the "set" filter - a user could filter to all set values that match the default value to see which arguments are redundant and can be removed.

(But the more useful filter is certainly the "set" one, I also thought it would look a little strange to have a Filter dialog with only one filter in it)

@kenzieschmoll
Copy link
Member

I think this is mostly useful in conjunction with the "set" filter - a user could filter to all set values that match the default value to see which arguments are redundant and can be removed.

Counter argument to this is that this can already be caught today with a lint.

(But the more useful filter is certainly the "set" one, I also thought it would look a little strange to have a Filter dialog with only one filter in it)

I think having only one filter is fine as long as that filter is a relevant user journey. I'd argue that we should start with what we know is useful and let users ask for things we are missing rather than adding options that a user "might" want at some point.

@elliette
Copy link
Member Author

I think having only one filter is fine as long as that filter is a relevant user journey. I'd argue that we should start with what we know is useful and let users ask for things we are missing rather than adding options that a user "might" want at some point.

SG! Removed the "default" filter

@elliette elliette merged commit fb3986f into flutter:master Apr 2, 2025
41 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Property Editor] Add ability to filter and search for properties

2 participants