-
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
[Region Map] Shim new Platform #40966
Conversation
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
Pinging @elastic/kibana-gis |
💔 Build Failed |
import { toastNotifications } from 'ui/notify'; | ||
import regionMapVisParamsTemplate from './region_map_vis_params.html'; | ||
import { mapToLayerWithId } from './util'; | ||
import '../../tile_map/public/editors/wms_options'; | ||
|
||
// TODO: reference to TILE_MAP plugin should be removed | ||
import { ORIGIN } from '../../../../legacy/core_plugins/tile_map/common/origin'; |
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.
@lukeelmers @nreese
In this PR I've marked all places where we do an import from tile_map plugin. Not sure that we need to fix it now because in future we are going to create one common plugin for tile_map and region_map
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.
I agree this is probably outside the scope of this PR.
We could open another PR that exports it (and any other stuff imported from it) from tile_map/public/index
if you think it will make it easier to remember later.
But I don't think it's critical to address right now unless @nreese feels otherwise.
💚 Build Succeeded |
import { toastNotifications } from 'ui/notify'; | ||
import regionMapVisParamsTemplate from './region_map_vis_params.html'; | ||
import { mapToLayerWithId } from './util'; | ||
import '../../tile_map/public/editors/wms_options'; | ||
|
||
// TODO: reference to TILE_MAP plugin should be removed | ||
import { ORIGIN } from '../../../../legacy/core_plugins/tile_map/common/origin'; |
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.
I agree this is probably outside the scope of this PR.
We could open another PR that exports it (and any other stuff imported from it) from tile_map/public/index
if you think it will make it easier to remember later.
But I don't think it's critical to address right now unless @nreese feels otherwise.
import { TileMapTooltipFormatter } from './tooltip_formatter'; | ||
|
||
// TODO: reference to TILE_MAP plugin should be removed | ||
import { BaseMapsVisualizationProvider } from '../../tile_map/public/base_maps_visualization'; |
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.
This is another thing we could potentially export directly from tile_map/public
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.
We could open another PR that exports it (and any other stuff imported from it) from tile_map/public/index if you think it will make it easier to remember later.
Yes, that can be addressed in another PR. Maybe tile map and region map should be in the same plugin if region map needs a bunch of stuff from tile map but that can be considered in another PR as well
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.
@nreese @thomasneirynck Yeah our idea in the new platform migration plans was to have a single vis_type_maps
plugin that could register both of the maps visualizations since they are sharing some code. But y'all would probably be better judges of the feasibility of that. In the interim we can just keep them shimmed separately like this.
💚 Build Succeeded |
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.
thx @Avinar-24
I tested this and looks good to me, but not comfortable enough to speak to the actual changes wrt new platform.
setupDOM('512px', '512px'); | ||
|
||
imageComparator = new ImageComparator(); | ||
vis = new Vis(indexPattern, { | ||
type: 'region_map' | ||
type: 'tile_map' |
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.
Thanks for fixing. This was nasty. This just used to work because it was using the vis-object only for the configuration params when calling new CoordinateMapsVisualization(domNode, vis)
.
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
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 in terms of new platform prep!
Edit: let's wait for a final approval from @thomasneirynck or @nreese though
import { TileMapTooltipFormatter } from './tooltip_formatter'; | ||
|
||
// TODO: reference to TILE_MAP plugin should be removed | ||
import { BaseMapsVisualizationProvider } from '../../tile_map/public/base_maps_visualization'; |
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.
@nreese @thomasneirynck Yeah our idea in the new platform migration plans was to have a single vis_type_maps
plugin that could register both of the maps visualizations since they are sharing some code. But y'all would probably be better judges of the feasibility of that. In the interim we can just keep them shimmed separately like this.
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
@lukeelmers @Avinar-24 I like the idea of single plugin registering both region and coordinate map visualizations. +1 on separate PR for that.
* Migrate Region Map to New Platform * Replace Vis Factory * fix plugin name - work in progress * code cleanup * fix tests for tile_map * fix PR comments * fix PR comments
Summary
First step of migrating to the new Platform
What was done in this PR: