-
Notifications
You must be signed in to change notification settings - Fork 8.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
[Maps] Update GisMapController to use stateful SearchBar #57282
Conversation
@@ -9,21 +9,16 @@ | |||
show-search-bar="chrome.getVisible()" | |||
show-filter-bar="chrome.getVisible()" | |||
show-date-picker="showDatePicker" | |||
show-save-query="showSaveQuery" | |||
index-patterns="indexPatterns" |
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.
👍
|
||
function syncAppAndGlobalState() { | ||
const onQueryChange = _.debounce((forceRefresh = false) => { | ||
console.log('onQueryChange'); |
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.
Remove console.log?
syncAppAndGlobalState(); | ||
|
||
store.dispatch(setRefreshConfig($scope.refreshConfig)); | ||
$scope.onQuerySubmit = function({ query }) { |
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.
onQuerySubmit has a second, isUpdate argument
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.
Looks great in terms of using the stateful SearchBar :)
Didn't dive deep into the state management on the app side.
@elasticmachine merge upstream |
💔 Build FailedTest FailuresKibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/maps/es_geo_grid_source·js.maps app layer geo grid aggregation source heatmap should re-fetch geotile_grid aggregation with refresh timerStandard Out
Stack Trace
Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/maps/es_geo_grid_source·js.maps app layer geo grid aggregation source heatmap should re-fetch geotile_grid aggregation with refresh timerStandard Out
Stack Trace
Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/maps/documents_source/search_hits·js.maps app documents source search hits should re-fetch documents with refresh timerStandard Out
Stack Trace
History
To update your PR or re-run it, just comment with: |
@@ -405,6 +405,7 @@ export class ESSearchSource extends AbstractESSource { | |||
} | |||
|
|||
async getGeoJsonWithMeta(layerName, searchFilters, registerCancelCallback) { | |||
console.log('fetch getGeoJsonWithMeta', searchFilters); |
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.
Remove console.log
closing. Obsolete with move to new platform |
#56160 added
use-default-behaviors
toSearchBar
component. This PR updatesGisMapController
to use this new behavior to simplify $scope and state manegement. This is will make the migration away fromappState
easier since it removes lots of the state management fromGisMapController