fix: Explore popovers issues (#11428)

* Fix spaces and comas not working in filter popover

* Fix popup not opening automatically

* Add e2e test

* Remove only from test

* Remove redundant test, add checking label content

* Add comments to e2e test

* Fix unit test

* Use destructuring

* Always open popup for functions and saved metrics, too

* Fix popover for adhoc metrics too

* Small refactor to consistency

* Refactor for consistency

* Remove redundant functions

* Test fix

Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
This commit is contained in:
Kamil Gabryjelski
2020-10-28 17:38:52 +01:00
committed by GitHub
parent 88e5e9855d
commit b2636f01bb
8 changed files with 120 additions and 112 deletions

View File

@@ -180,9 +180,10 @@ export default class AdhocFilterControl extends React.Component {
operator: OPERATORS['>'],
comparator: 0,
clause: CLAUSES.HAVING,
isNew: true,
});
}
// has a custom label
// has a custom label, meaning it's custom column
if (option.label) {
return new AdhocFilter({
expressionType:
@@ -196,6 +197,7 @@ export default class AdhocFilterControl extends React.Component {
operator: OPERATORS['>'],
comparator: 0,
clause: CLAUSES.HAVING,
isNew: true,
});
}
// add a new filter item
@@ -262,7 +264,7 @@ export default class AdhocFilterControl extends React.Component {
render() {
return (
<div className="metrics-select">
<div className="metrics-select" data-test="adhoc-filter-control">
<ControlHeader {...this.props} />
<OnPasteSelect
isMulti