-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Cleanup sources #63175
[Maps] Cleanup sources #63175
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
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; |
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.
Should be (source?: ISource) => void;
Source can be null - here is an example
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.
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
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
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
|
||
destroy(): void; | ||
createDefaultLayer(): ILayer; | ||
createDefaultLayer(options?: LayerDescriptor, mapColors?: string[]): ILayer; |
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.
Should options
also be Partial<LayerDescriptor>
here?
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.
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.
- Introduces additional TS typing for sources - Organizes sources in sub-directories by type - migrates XYZTMSSource to TS
The introduction of a new source-type in #62084 is is revealing a lot of dangling TS issues with sources and layers.
xyz_tms_source
to typescript as a POC