Skip to content
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 layer edit controls #99812

Merged
merged 123 commits into from
Jun 17, 2021
Merged

[Maps] Add layer edit controls #99812

merged 123 commits into from
Jun 17, 2021

Conversation

kindsun
Copy link
Contributor

@kindsun kindsun commented May 11, 2021

Adds layer edit control toolbar for any index-based layer in the Maps app as part of #96836.

image

To test, add xpack.maps.enableDrawingFeature: true to your kibana.yml

Functionality this PR adds:

  • The ability to add points (for point layers) or shapes (for shape layers) to any non-clustered, non-global-time-filtered, es doc layer
  • Shapes included: lines, points, bounding boxes, circles, polygons

What this PR doesn't add, but is planned for the future:

  • Integration with the new vector layer wizard
  • Ability to edit/remove existing shapes
  • Attribute editing capability

How to edit features:

  • Add sample data
  • Create a map, add any sample data layer
  • Disable global time filter in layer settings, save and close layer settings
  • Left click on layer in TOC and open Edit features in pop-up menu
  • This will open the Edit features toolbar on the left with just points enabled
  • To test shapes editing capability, extract and upload the attached file below via GeoJSON Uploader and repeat the above steps (except the global time filter toggle, that shouldn't apply here)

australia_states_v1.geo.zip

Aaron Caldwell added 30 commits March 26, 2021 15:50
@kindsun kindsun requested a review from nreese June 16, 2021 17:43
@miukimiu
Copy link
Contributor

@aaronjcaldwell @nreese,

I pushed a few design changes with 95e97c1.

I changed the icons. The layer settings or "Edit layer" is now using the old icon. The edit features is now using the "vector" icon.

Screenshot 2021-06-16 at 18 38 15

Another change is the active state in the toolbar now is more prominent. The hover keeps the same.

toolbar@2x

When we are feature editing the background in the layer panel highlights. I don't think we need the dashed red border.

Screenshot 2021-06-16 at 19 11 42

After this, we need to open a new PR with some design changes. We can discuss it tomorrow in our meeting. You can find the prototype here. But the main idea is that the exit button would move to the highlighted layer and also we would add a badge saying that we are in "drawing mode".

Draw mode

@kindsun
Copy link
Contributor Author

kindsun commented Jun 16, 2021

@miukimiu Thanks for the clean-up 🙇 ! Changes look good to me for this PR. Looking forward to your next pass on edit tools in a separate PR, the preview shot of what that will look like looks great!

Let me know if there are any more changes you'd like to get in for this PR or if you need any updates from me.

@kindsun kindsun requested a review from nreese June 16, 2021 20:17
Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good. Just some minor comments

@kindsun kindsun requested a review from nreese June 16, 2021 22:14
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
maps 733 742 +9

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
maps 195 202 +7

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
maps 2.6MB 3.1MB ⚠️ +486.1KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
maps 63.6KB 64.4KB +778.0B
Unknown metric groups

API count

id before after diff
maps 196 203 +7

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Contributor

@miukimiu miukimiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a design perspective, it looks good. We're using the right icons, colors and the toolbar now has better states. 🎉

As I commented on #99812 (comment) we decided to improve the user flow in a different PR.

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for sticking with all the review comments. This PR turned out really nice and its great to be able to draw features and index them.

@kindsun kindsun merged commit 246e7be into elastic:master Jun 17, 2021
@kindsun kindsun deleted the draw-controls-ui branch June 17, 2021 13:21
kindsun pushed a commit to kindsun/kibana that referenced this pull request Jun 17, 2021
kindsun pushed a commit that referenced this pull request Jun 17, 2021
Co-authored-by: miukimiu <[email protected]>

Co-authored-by: miukimiu <[email protected]>
majagrubic pushed a commit to majagrubic/kibana that referenced this pull request Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:enhancement release_note:feature Makes this part of the condensed release notes v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants