Replace legacy MapEmbeddable with MapComponent in Obs UX solution#182841
Replace legacy MapEmbeddable with MapComponent in Obs UX solution#182841nickpeihl merged 3 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
|
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
| isLayerTOCOpen?: boolean; | ||
| mapCenter?: MapCenterAndZoom; | ||
| onInitialRenderComplete?: () => void; | ||
| renderTooltipContent?: RenderToolTipContent; |
There was a problem hiding this comment.
Lets call this getTooltipRenderer. Its also added in #182737. The reason for get is that its value is only used once and not updated when the value changes. If its just renderTooltipContent then users of the Component would expect that changing the prop would be reflected in the component.
| setLayerList: jest.fn(), | ||
| }), | ||
| })); | ||
| const mockMapsApi = { |
There was a problem hiding this comment.
Same comment as in your other PR, lets rename as mockMapsStartApi or mockMapsStartService to avoid naming confusion with MapApi type
💚 Build Succeeded
Metrics [docs]Async chunks
Canvas Sharable Runtime
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
| from: new Date(start).toISOString(), | ||
| to: new Date(end).toISOString(), | ||
| }; | ||
| embeddable.updateInput({ timeRange }); |
There was a problem hiding this comment.
So there's no need to update the input anymore?
There was a problem hiding this comment.
Nope. The maps.Map component updates the embeddable input from the props that are passed into it.
Summary
Replaces the Maps embeddable with a new MapComponent in the Observability UX solution.
The Maps plugin now provides an easier to use MapComponent for consumers. The legacy MapEmbeddable factory is also being removed as part of #174960 which requires making changes to consumers.
For maintainers