-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
chore: customize adhoc filter icon and fix creatable label #14896
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14896 +/- ##
==========================================
- Coverage 77.51% 77.39% -0.12%
==========================================
Files 963 963
Lines 49315 49316 +1
Branches 6226 6228 +2
==========================================
- Hits 38225 38167 -58
- Misses 10889 10950 +61
+ Partials 201 199 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
...c/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.jsx
Outdated
Show resolved
Hide resolved
@@ -417,6 +418,9 @@ export default class AdhocFilterEditPopoverSimpleTabContent extends React.Compon | |||
onSearch={val => this.setState({ currentSuggestionSearch: val })} | |||
onSelect={this.clearSuggestionSearch} | |||
onBlur={this.clearSuggestionSearch} | |||
menuItemSelectedIcon={ | |||
operator === 'NOT IN' ? <StopOutlined /> : <CheckOutlined /> |
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.
<Icons.StopOutlined>
and <Icons.CheckOutlined>
77f7249
to
b52b425
Compare
b52b425
to
530919c
Compare
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.
LGTM!
<Icons.StopOutlined iconSize="m" /> | ||
) : ( | ||
<Icons.CheckOutlined iconSize="m" /> | ||
) |
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.
May be shorter will be and also without duplication :)
const Icon = inverseSelection ? Icons.StopOutlined : Icons.CheckOutlined
...
menuItemSelectedIcon={<Icon iconSize="m" />}
530919c
to
8a5eff4
Compare
SUMMARY
Harmonize AntD Select components that are used in Explore/Dashboard view. This changes the following:
StopOutline
Icon if "NOT IN" operator is selected. This is to align the behavior with the native select filter polish introduced in feat(native-filters): improve inverse selection indicators #14873react-select
based component used in Filter Box:BEFORE
When "NOT IN" is selected in the adhoc filter popover, we currently use the default
CheckOutlined
icon:When being presented with the option to create a value that doesn't exist in the dataset, the option to use a value that doesn't exist is shown as-is:
AFTER
When "NOT IN" is selected in the adhoc filter popover, we now use the
StopOutlined
When being presented with the option to create a value that doesn't exist in the dataset, The creatable value is prefixed with "Create" and the value placed inside quotes:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION