-
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
Uiactions to navigate to visualize or maps #74121
Uiactions to navigate to visualize or maps #74121
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
src/plugins/discover/public/application/components/sidebar/lib/visualize_trigger_utils.ts
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/plugin.ts
Outdated
declare module '../../../../src/plugins/ui_actions/public' { | ||
export interface ActionContextMapping { | ||
[ACTION_VISUALIZE_GEO_FIELD]: VisualizeFieldContext; | ||
} | ||
} |
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.
@stratoula could we then so far move that type declaraction into the plugin where it's defined?
src/plugins/discover/public/application/components/sidebar/lib/visualize_trigger_utils.ts
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/components/sidebar/lib/visualize_trigger_utils.ts
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx
Outdated
Show resolved
Hide resolved
src/plugins/discover/public/application/components/sidebar/discover_field_details.tsx
Outdated
Show resolved
Hide resolved
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.
Code LGTM 👍 it's much better this way, thx for this cleanup and improvement! Tested locally in Firefox, Chrome, Safari, also with a role with only Discover enabled. No regressions detected.
💛 Build succeeded, but was flaky
Test FailuresPlugin Functional Tests.test/plugin_functional/test_suites/core/route·ts.core route timeouts idle socket should timeout if servers response is too slowStandard Out
Stack Trace
Build metrics@kbn/optimizer bundle module count
async chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
* Navigate from discover to visualize with registering into a trigger * Implement the VISUALIZE_FIELD action * Implementation of the maps app trigger actions with the isCompatible functionality * clean up discover code and tile map action implementation * Add typeIsHidden on mocks * Retrieve filters and query from url state * functional test for oss and tile map * include geoshape * fix functional tests * fix types * remove unecessary dependencies * minor fixes * Remove tilemaps actios as it is going tobe deprecated * Add useEffect on discover details and move the map action to a separate folder * Retrieve map tooltips info from context * Retrieve query and filters from QueryService * Building urls with urlGenerators * replace with constants, fetch initialLayers as array * remove irrelevant comments * nice improvements * Return contextualFields for both triggers * Add getHref on actions, move capabilities to isCompatible method per action and other fixes * fix type * Fix type incompatibility after merging with master * fixes on maps plugin file after merge * remove unecessary declarations * nice improvements * Refactor maps services code to be inline with master Co-authored-by: Elastic Machine <[email protected]>
* Navigate from discover to visualize with registering into a trigger * Implement the VISUALIZE_FIELD action * Implementation of the maps app trigger actions with the isCompatible functionality * clean up discover code and tile map action implementation * Add typeIsHidden on mocks * Retrieve filters and query from url state * functional test for oss and tile map * include geoshape * fix functional tests * fix types * remove unecessary dependencies * minor fixes * Remove tilemaps actios as it is going tobe deprecated * Add useEffect on discover details and move the map action to a separate folder * Retrieve map tooltips info from context * Retrieve query and filters from QueryService * Building urls with urlGenerators * replace with constants, fetch initialLayers as array * remove irrelevant comments * nice improvements * Return contextualFields for both triggers * Add getHref on actions, move capabilities to isCompatible method per action and other fixes * fix type * Fix type incompatibility after merging with master * fixes on maps plugin file after merge * remove unecessary declarations * nice improvements * Refactor maps services code to be inline with master Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* master: (112 commits) [Ingest Manager] Fix agent config rollout rate limit to use constants (elastic#75364) Update Node.js to version 10.22.0 (elastic#75254) [ML] Anomaly Explorer / Single Metric Viewer: Fix error reporting for annotations. (elastic#74953) [Discover] Fix histogram cloud tests (elastic#75268) Uiactions to navigate to visualize or maps (elastic#74121) Use prefix search invis editor field/agg combo box (elastic#75290) Fix docs in trigger alerting UI (elastic#75363) [SIEM] Fixes search bar Cypress test (elastic#74833) Add libnss3.so to Dockerfile template (reporting) (elastic#75370) [Discover] Create field_button and add popovers to sidebar (elastic#73226) [Reporting] Network Policy: Do not throw from the intercept handler (elastic#75105) [Reporting] Increase capture.timeouts.openUrl to 1 minute (elastic#75207) Allow routes to specify the idle socket timeout in addition to the payload timeout (elastic#73730) [src/dev/build] remove node-version from snapshots (elastic#75303) [ENDPOINT] Reintroduced tabs to endpoint management and migrated pages to use common security components (elastic#74886) [Canvas] Remove dependency on legacy expressions APIs (elastic#74885) Skip failing test in CI (elastic#75266) [Task Manager] time out work when it overruns in poller (elastic#74980) [Drilldowns] misc improvements & fixes (elastic#75276) Small README note on bumping memory for builds (elastic#75247) ...
* master: (30 commits) [code coverage] always download node before team assignment (elastic#75424) [Form lib] Allow new "defaultValue" to be provided when resetting the… (elastic#75302) [Logs UI] Add "View in machine learning" links in the anomaly explorer (elastic#74555) skip flaky suite (elastic#75440) skip flaky suite (elastic#75386) [Saved objects] Add support for version on create & bulkCreate when overwriting a document (elastic#75172) [Functional]Table Vis increase sleep time in order filter to be applied (elastic#75138) MOAR RAM (elastic#75423) [Visualize] Horizontal Bar Percentiles Overlapping (elastic#75315) [ML] DF Analytics / Transforms: Fix job row actions menu invalid DOM nesting warning (elastic#74499) [ML] Inference models management (elastic#74978) [Monitoring] Migrate karma tests (elastic#75301) [Index template] Add filters to simulate preview (elastic#74497) Bump and consolidate dependencies (elastic#75360) [Ingest Manager] Fix agent config rollout rate limit to use constants (elastic#75364) Update Node.js to version 10.22.0 (elastic#75254) [ML] Anomaly Explorer / Single Metric Viewer: Fix error reporting for annotations. (elastic#74953) [Discover] Fix histogram cloud tests (elastic#75268) Uiactions to navigate to visualize or maps (elastic#74121) Use prefix search invis editor field/agg combo box (elastic#75290) ...
Summary
Closes #70178.
Changes the way that discover navigates to Visualize or Maps apps. We use two triggers:
VISUALIZE_FIELD
for handling the navigation to visualize editor (except geo field)VISUALIZE_GEO_FIELD
for handling the navigation to tilemaps or maps appBoth tilemaps and maps app register to
VISUALIZE_GEO_FIELD
.It is checked whether the maps app is enabled and the tilemaps is hidden or not. If it is not hidden and the maps app is enabled the user has two options to visualize a geo field. Otherwise, the Visualize button will navigate the user to the plugin that is compatible.Update: As tilemaps are going to be deprecated we decided to not register any actions for legacy mapping visualizations.
This means that if the maps app is not enabled, the visualize button for geo fields won't appear on Discover.
Except for that, the previous functionality is the same. We had functional tests to check the navigation from discover to visualize and from discover to the maps app. I added a new one to check the navigation to tilemaps.
I have also run a flaky test server https://kibana-ci.elastic.co/job/kibana+flaky-test-suite-runner/741/
Checklist