-
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] Add shape drawing wizard- creates index only #96913
Conversation
… step not initiating
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! some comments for cleanup and possible simplification of the wizard, otherwise good2go imho
export const newVectorLayerWizardConfig: LayerWizard = { | ||
categories: [], | ||
description: i18n.translate('xpack.maps.newVectorLayerWizard.description', { | ||
defaultMessage: 'Draw points, lines, and polygons to create or edit documents', |
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.
my 2c the wording should be more generic, but @kmartastic has final call here:
more along the lines of:
title: Create new document layer
and
description: ```Creates a new index pattern. Can be used to draw shapes and points`.
or something.
We can work on the more integrated wording, when we actually integrate the flow after this PR and the one for the drawing toolbar have merged. But right now, that integration is still todo, so it's a little confusing.
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 see your point, just a little reluctant to touch the wording again on this PR after we got to somewhat of a settling point. I think we'll be iterating on this before pulling out of experimental mode so no need for it to be final at this point. Let me know if you feel strongly though
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.
let's change it, so this PR can standalone and we're not priming it for hypothetical later work.
I'd propose:
- "title": "Create new document layer"
- "description": Creates a new empty index pattern. Use this to draw shapes and point".
^ we can change once we start pulling threads together.
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.
Can we keep the title shorter? Most of the other card titles are a single word. I really like "draw" so something short.
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.
+1 to a shorter title, which makes it easier to scan.
For the description how about shortening to:
Create an empty index pattern to draw shapes and points.
Also, aren't index patterns being renamed in 7.14?
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/wizard.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/wizard.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/wizard.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/utils/indexing_service.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/config.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/index.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/utils/indexing_service.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/wizard.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/wizard.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/wizard.tsx
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/wizard.tsx
Show resolved
Hide resolved
x-pack/plugins/file_upload/public/components/geojson_upload_form/index_name_form.tsx
Show resolved
Hide resolved
</Fragment> | ||
} | ||
/> | ||
<IndexNameForm |
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.
Pass in the below props give users feedback when name is getting validated
onIndexNameValidationEnd={this.props.enableNextBtn}
onIndexNameValidationStart={this.props.disableNextBtn}
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 thinks this logic needs some rethinking on the IndexNameForm
side but not sure it fits in this PR. Using that logic above enables the button even when there are errors. Even adding an if statement to check for errors on the callback runs into timing issues that leave the button active with errors in place:
() => {
if (this.state.indexName && !this.state.indexError) {
this.props.enableNextBtn();
}
}
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.
some small comments, otherwise good2go from my end.
x-pack/plugins/file_upload/public/components/index_name_form_async_wrapper.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/wizard.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/file_upload/public/api/json_upload_and_parse_async_wrapper.tsx
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/wizard.tsx
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/wizard.tsx
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/wizard.tsx
Show resolved
Hide resolved
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Closing this. Replaced by #100278. |
Overview
Adds the wizard capability described in #96836. To run and test:
kibana.yml
:Open Maps
>Add layer
>Draw new vector layer
Index features
at the bottom rightStack management
A few open questions
GeoJSON Upload
, and likeGeoJSON Upload
it's a low barrier-to-entry layer-add option. That said, it can go anywhere (1st, 2nd, last, etc.) if there are any strong opinions.Draw vector shapes
portion, we likely need something giving the user some instruction here, but I'm very open to what that looks like and consists of. @miukimiu @kmartasticDraw shapes
,Draw vector shapes
,Draw
, something else? Not critical, we can change this in a later PR before pulling out the feature flag.Notes