-
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 embeddable] fix map layers disappear from map panel when using session storage to continue editing a dashboard #193629
Conversation
…session storage to continue editing a dashboard
/ci |
/ci |
/ci |
@elasticmachine merge upstream |
/ci |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
Public APIs missing exports
History
To update your PR or re-run it, just comment with: |
Pinging @elastic/kibana-presentation (Team:Presentation) |
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!
code review and tested map layers and map filters are restored from session storage.
@@ -9,7 +9,7 @@ import type { LayerDescriptor } from '../../common/descriptor_types'; | |||
import type { CreateLayerDescriptorParams } from '../classes/sources/es_search_source'; | |||
import type { SampleValuesConfig, EMSTermJoinConfig } from '../ems_autosuggest'; | |||
import type { Props as PassiveMapProps } from '../lens/passive_map'; | |||
import type { Props as MapProps } from '../react_embeddable/map_renderer'; | |||
import type { Props as MapProps } from '../react_embeddable/map_renderer/map_renderer'; |
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.
super nit, exporting from an index.ts
file in the map_renderer
directory would make these imports appear less duplicative. but I'm fine either way.
…session storage to continue editing a dashboard (elastic#193629) Closes elastic#190468 and elastic#193601 Dashboard unsaved changes for a panel are obtained from the embeddable comparator subject for each comparator. If comparator subject does not return a value, then this information is lost when returning to a dashboard with unsaved changes. This is why layers and filters where disappearing from a map when returning to a dashboard with unsaved changes. This PR resolves this issue by providing comparator subjects and setters for `savedObjectId`, `attributes`, and `mapSettings`. PR also resolves issue of passing props from `MapRenderer` component into map embeddable. Instead of passing props via state, props should be passed from `MapRenderer` parent api. --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit a8ebc7f)
…session storage to continue editing a dashboard (elastic#193629) Closes elastic#190468 and elastic#193601 Dashboard unsaved changes for a panel are obtained from the embeddable comparator subject for each comparator. If comparator subject does not return a value, then this information is lost when returning to a dashboard with unsaved changes. This is why layers and filters where disappearing from a map when returning to a dashboard with unsaved changes. This PR resolves this issue by providing comparator subjects and setters for `savedObjectId`, `attributes`, and `mapSettings`. PR also resolves issue of passing props from `MapRenderer` component into map embeddable. Instead of passing props via state, props should be passed from `MapRenderer` parent api. --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit a8ebc7f)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…using session storage to continue editing a dashboard (#193629) (#193797) # Backport This will backport the following commits from `main` to `8.x`: - [[maps embeddable] fix map layers disappear from map panel when using session storage to continue editing a dashboard (#193629)](#193629) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-23T20:58:09Z","message":"[maps embeddable] fix map layers disappear from map panel when using session storage to continue editing a dashboard (#193629)\n\nCloses #190468 and\r\nhttps://github.com//issues/193601\r\n\r\nDashboard unsaved changes for a panel are obtained from the embeddable\r\ncomparator subject for each comparator. If comparator subject does not\r\nreturn a value, then this information is lost when returning to a\r\ndashboard with unsaved changes. This is why layers and filters where\r\ndisappearing from a map when returning to a dashboard with unsaved\r\nchanges. This PR resolves this issue by providing comparator subjects\r\nand setters for `savedObjectId`, `attributes`, and `mapSettings`.\r\n\r\nPR also resolves issue of passing props from `MapRenderer` component\r\ninto map embeddable. Instead of passing props via state, props should be\r\npassed from `MapRenderer` parent api.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a8ebc7f4686e359e9893e7e6fed291711c38dad4","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","v9.0.0","Feature:Maps","v8.16.0","backport:version","v8.15.3"],"title":"[maps embeddable] fix map layers disappear from map panel when using session storage to continue editing a dashboard","number":193629,"url":"https://github.com/elastic/kibana/pull/193629","mergeCommit":{"message":"[maps embeddable] fix map layers disappear from map panel when using session storage to continue editing a dashboard (#193629)\n\nCloses #190468 and\r\nhttps://github.com//issues/193601\r\n\r\nDashboard unsaved changes for a panel are obtained from the embeddable\r\ncomparator subject for each comparator. If comparator subject does not\r\nreturn a value, then this information is lost when returning to a\r\ndashboard with unsaved changes. This is why layers and filters where\r\ndisappearing from a map when returning to a dashboard with unsaved\r\nchanges. This PR resolves this issue by providing comparator subjects\r\nand setters for `savedObjectId`, `attributes`, and `mapSettings`.\r\n\r\nPR also resolves issue of passing props from `MapRenderer` component\r\ninto map embeddable. Instead of passing props via state, props should be\r\npassed from `MapRenderer` parent api.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a8ebc7f4686e359e9893e7e6fed291711c38dad4"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193629","number":193629,"mergeCommit":{"message":"[maps embeddable] fix map layers disappear from map panel when using session storage to continue editing a dashboard (#193629)\n\nCloses #190468 and\r\nhttps://github.com//issues/193601\r\n\r\nDashboard unsaved changes for a panel are obtained from the embeddable\r\ncomparator subject for each comparator. If comparator subject does not\r\nreturn a value, then this information is lost when returning to a\r\ndashboard with unsaved changes. This is why layers and filters where\r\ndisappearing from a map when returning to a dashboard with unsaved\r\nchanges. This PR resolves this issue by providing comparator subjects\r\nand setters for `savedObjectId`, `attributes`, and `mapSettings`.\r\n\r\nPR also resolves issue of passing props from `MapRenderer` component\r\ninto map embeddable. Instead of passing props via state, props should be\r\npassed from `MapRenderer` parent api.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a8ebc7f4686e359e9893e7e6fed291711c38dad4"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nathan Reese <[email protected]>
… using session storage to continue editing a dashboard (#193629) (#193796) # Backport This will backport the following commits from `main` to `8.15`: - [[maps embeddable] fix map layers disappear from map panel when using session storage to continue editing a dashboard (#193629)](#193629) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-23T20:58:09Z","message":"[maps embeddable] fix map layers disappear from map panel when using session storage to continue editing a dashboard (#193629)\n\nCloses #190468 and\r\nhttps://github.com//issues/193601\r\n\r\nDashboard unsaved changes for a panel are obtained from the embeddable\r\ncomparator subject for each comparator. If comparator subject does not\r\nreturn a value, then this information is lost when returning to a\r\ndashboard with unsaved changes. This is why layers and filters where\r\ndisappearing from a map when returning to a dashboard with unsaved\r\nchanges. This PR resolves this issue by providing comparator subjects\r\nand setters for `savedObjectId`, `attributes`, and `mapSettings`.\r\n\r\nPR also resolves issue of passing props from `MapRenderer` component\r\ninto map embeddable. Instead of passing props via state, props should be\r\npassed from `MapRenderer` parent api.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a8ebc7f4686e359e9893e7e6fed291711c38dad4","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","v9.0.0","Feature:Maps","v8.16.0","backport:version","v8.15.3"],"title":"[maps embeddable] fix map layers disappear from map panel when using session storage to continue editing a dashboard","number":193629,"url":"https://github.com/elastic/kibana/pull/193629","mergeCommit":{"message":"[maps embeddable] fix map layers disappear from map panel when using session storage to continue editing a dashboard (#193629)\n\nCloses #190468 and\r\nhttps://github.com//issues/193601\r\n\r\nDashboard unsaved changes for a panel are obtained from the embeddable\r\ncomparator subject for each comparator. If comparator subject does not\r\nreturn a value, then this information is lost when returning to a\r\ndashboard with unsaved changes. This is why layers and filters where\r\ndisappearing from a map when returning to a dashboard with unsaved\r\nchanges. This PR resolves this issue by providing comparator subjects\r\nand setters for `savedObjectId`, `attributes`, and `mapSettings`.\r\n\r\nPR also resolves issue of passing props from `MapRenderer` component\r\ninto map embeddable. Instead of passing props via state, props should be\r\npassed from `MapRenderer` parent api.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a8ebc7f4686e359e9893e7e6fed291711c38dad4"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193629","number":193629,"mergeCommit":{"message":"[maps embeddable] fix map layers disappear from map panel when using session storage to continue editing a dashboard (#193629)\n\nCloses #190468 and\r\nhttps://github.com//issues/193601\r\n\r\nDashboard unsaved changes for a panel are obtained from the embeddable\r\ncomparator subject for each comparator. If comparator subject does not\r\nreturn a value, then this information is lost when returning to a\r\ndashboard with unsaved changes. This is why layers and filters where\r\ndisappearing from a map when returning to a dashboard with unsaved\r\nchanges. This PR resolves this issue by providing comparator subjects\r\nand setters for `savedObjectId`, `attributes`, and `mapSettings`.\r\n\r\nPR also resolves issue of passing props from `MapRenderer` component\r\ninto map embeddable. Instead of passing props via state, props should be\r\npassed from `MapRenderer` parent api.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"a8ebc7f4686e359e9893e7e6fed291711c38dad4"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nathan Reese <[email protected]>
Closes #190468 and #193601
Dashboard unsaved changes for a panel are obtained from the embeddable comparator subject for each comparator. If comparator subject does not return a value, then this information is lost when returning to a dashboard with unsaved changes. This is why layers and filters where disappearing from a map when returning to a dashboard with unsaved changes. This PR resolves this issue by providing comparator subjects and setters for
savedObjectId
,attributes
, andmapSettings
.PR also resolves issue of passing props from
MapRenderer
component into map embeddable. Instead of passing props via state, props should be passed fromMapRenderer
parent api.