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] layer groups #142528

Merged
merged 41 commits into from
Oct 13, 2022
Merged

[Maps] layer groups #142528

merged 41 commits into from
Oct 13, 2022

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Oct 3, 2022

Fixes #37252

PR enhances Map legend, allowing users to group layers into tree view. PR updates remove layer action with a modal ensuring users are aware that removing a layer group will also remove all sub layers.

Screen Shot 2022-10-06 at 2 35 00 PM

Screen Shot 2022-10-06 at 2 39 26 PM

Create layer group

Click the grab handle to the right of layer in the legend and hold the mouse button to initiate dragging. Then, drag the layer until it over laps with another layer. The layer will become semi-transparent and the mouse cursor will change to indicate when in "combining" state. Let go of the mouse button and a new layer group will be created that contains the 2 layers.

Move layer group

Layer groups can be re-ordered like any layer by dragging the "reorder" handle in the legend. Re-ordering a layer group will also move all sublayers to new tree location. Layer groups cannot be moved into their ancestry chain.

Move a layer into a layer group

There are 2 ways to move a layer into a layer group. Do one of the following:

  • drag layer onto layer group entry until layer is semi-transparent and the mouse cursor will change to indicate when in "combining" state. Release mouse button. This will add layer to top of layer group
  • drag layer in between layer group and layers contained by layer group. This will add layer to the layer group at the position of drag.

Move a layer out of a layer group

  • drag layer onto layer group entry until layer is semi-transparent and the mouse cursor will change to indicate when in "combining" state. Release mouse button. This will add layer to top of layer group
  • Use drag action to drag layer above or below layer group.

Follow up work

This PR is getting very large, so the following items have been excluded to follow up PRs

  • Layer group telemetry - ui counter update showing how many maps user layer groups
  • Layer group filter support - allow users to specify filter to layer group that gets applied to all sub layers of group
  • Security map updates - use layer groups to organize client and server layers, [Maps] "Point to Point" Data Source #41575 (comment)

@nreese
Copy link
Contributor Author

nreese commented Oct 6, 2022

@elasticmachine merge upstream

Copy link
Member

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

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

lgtm!

code review and tested in chrome

@nreese nreese requested review from mdefazio and gchaps October 12, 2022 18:02
@nreese
Copy link
Contributor Author

nreese commented Oct 12, 2022

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
maps 1004 1008 +4

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.7MB 2.7MB +12.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 82.1KB 82.1KB +28.0B

History

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

@nreese
Copy link
Contributor Author

nreese commented Oct 13, 2022

@mdefazio let me know if you have any more feedback. We plan on refining the UI with follow up PRs.

Copy link
Contributor

@gchaps gchaps left a comment

Choose a reason for hiding this comment

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

Text LGTM

Copy link
Contributor

@mdefazio mdefazio left a comment

Choose a reason for hiding this comment

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

I think this looks good. Happy to help in some follow-up PRs to add in some UI details to improve this, but I don't think these are blockers.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@sophiec20 sophiec20 added Feature:Maps and removed [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Maps release_note:enhancement Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Maps] Group layers into tree view
10 participants