[Maps] Cleanup sources#63175
Merged
thomasneirynck merged 28 commits intoelastic:masterfrom Apr 13, 2020
Merged
Conversation
Contributor
|
Pinging @elastic/kibana-gis (Team:Geo) |
nreese
reviewed
Apr 10, 2020
x-pack/plugins/maps/common/descriptor_types/descriptor_types.d.ts
Outdated
Show resolved
Hide resolved
| type LayerWizard = { | ||
| import { ISource } from './sources/source'; | ||
|
|
||
| export type PreviewSourceHandler = (source: ISource) => void; |
Contributor
There was a problem hiding this comment.
Should be (source?: ISource) => void;
Source can be null - here is an example
Contributor
Author
There was a problem hiding this comment.
if null is passed in explicitly, probably should make that explicit for now iso making it optional
export type PreviewSourceHandler = (source: ISource | null) => void;
x-pack/plugins/maps/public/layers/sources/xyz_tms_source/xyz_tms_editor.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/layers/sources/xyz_tms_source/xyz_tms_editor.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/layers/sources/xyz_tms_source/xyz_tms_editor.tsx
Show resolved
Hide resolved
x-pack/plugins/maps/public/layers/sources/xyz_tms_source/xyz_tms_editor.tsx
Show resolved
Hide resolved
x-pack/plugins/maps/public/layers/sources/xyz_tms_source/xyz_tms_editor.tsx
Show resolved
Hide resolved
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
nreese
approved these changes
Apr 13, 2020
|
|
||
| destroy(): void; | ||
| createDefaultLayer(): ILayer; | ||
| createDefaultLayer(options?: LayerDescriptor, mapColors?: string[]): ILayer; |
Contributor
There was a problem hiding this comment.
Should options also be Partial<LayerDescriptor> here?
Contributor
Author
There was a problem hiding this comment.
Good point. Fwiw, I'd leave it for now. In the code, it's either omitted, or preceded by a Layer.createDescriptor call, which does the normalization.
thomasneirynck
added a commit
to thomasneirynck/kibana
that referenced
this pull request
Apr 13, 2020
- Introduces additional TS typing for sources - Organizes sources in sub-directories by type - migrates XYZTMSSource to TS
thomasneirynck
added a commit
that referenced
this pull request
Apr 13, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The introduction of a new source-type in #62084 is is revealing a lot of dangling TS issues with sources and layers.
xyz_tms_sourceto typescript as a POC