[Lens] visualize in maps button#98677
Conversation
|
Pinging @elastic/kibana-gis (Team:Geo) |
wylieconlon
left a comment
There was a problem hiding this comment.
I know this is in draft, so I've left the smallest review I can.
x-pack/plugins/lens/public/indexpattern_datasource/visualize_geo_field_button.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/indexpattern_datasource/visualize_geo_field_button.tsx
Outdated
Show resolved
Hide resolved
|
@nreese @wylieconlon I wrote down an idea how to implement the second part of this feature (custom workspace drop target that leads to maps): https://gist.github.com/flash1293/3a55232eb1f0162125ad3aa8e1ac3f99 |
|
I wonder if we really want to show that geo point if there would be no action available for that trigger, or if we should already make listing those fields (and not just disabling the button within the popover) dependant on whether there is an action available? |
|
Agree with that @timroes - if the action is not available we should hide the field in the list. |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
flash1293
left a comment
There was a problem hiding this comment.
Looks pretty good already. Do you need some help to polish the UI? Or did you plan to do that after the general feature is working?
One thing we should probably think about: If the user came to Lens from dashboard and goes to maps via the action, the connection to dashboard is lost and the maps "Save" button will prompt them to select a dashboard again. Are we fine with that? Or should we find a way to pass this information along?
I will need help creating the icon from the screen shots in the demo. Also, any other suggestions would be helpful as well but I have mainly been focused on getting the functionality working |
|
@cchaos or @MichaelMarcialis Can you assist getting the icon out of the mockups here? #80078 |
Resolved
Functional test added to lens suite
I am fine having this work done in a separate PR since it could balloon in scope. |
flash1293
left a comment
There was a problem hiding this comment.
Looks almost good to me except for the a11y message when dragging to the new drop zone. The best solution I can think of (maybe someone else has a better idea) is to extend HumandData by something like specialCallout?: string which overwrites the default announcement and then setting it to something like Visualize {field} in Maps
...lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss
Outdated
Show resolved
Hide resolved
| const dragDropIdentifier = { | ||
| id: 'lnsGeoFieldWorkspace', | ||
| humanData: { | ||
| label: i18n.translate('xpack.lens.geoFieldWorkspace.workspaceLabel', { |
There was a problem hiding this comment.
This is used to construct the screen reader message if the user picks up the field using keyboard and moves it to the drop zone:

We can either add a special case for this here (extending humanData for a special message):
or think about something that fits into the existing template and makes clear this will move the user to Maps.
MichaelMarcialis
left a comment
There was a problem hiding this comment.
Left some small comments and suggestions below. Also going to send along an updated SVG globe graphic. Noticed some oddities in the original illustration that I'd like to correct. Stay tuned.
.../lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx
Outdated
Show resolved
Hide resolved
...lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss
Outdated
Show resolved
Hide resolved
.../lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx
Outdated
Show resolved
Hide resolved
...lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss
Outdated
Show resolved
Hide resolved
...lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss
Outdated
Show resolved
Hide resolved
x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx
Outdated
Show resolved
Hide resolved
…orkspace_panel/geo_field_workspace_panel.tsx Co-authored-by: Michael Marcialis <michael@marcial.is>
…orkspace_panel/geo_field_workspace_panel.scss Co-authored-by: Michael Marcialis <michael@marcial.is>
…orkspace_panel/geo_field_workspace_panel.tsx Co-authored-by: Michael Marcialis <michael@marcial.is>
…orkspace_panel/geo_field_workspace_panel.scss Co-authored-by: Michael Marcialis <michael@marcial.is>
…orkspace_panel/geo_field_workspace_panel.scss Co-authored-by: Michael Marcialis <michael@marcial.is>
Co-authored-by: Michael Marcialis <michael@marcial.is>
|
@elasticmachine merge upstream |
MichaelMarcialis
left a comment
There was a problem hiding this comment.
Left one small comment below. Otherwise, looks good to me. Approving now so I don't hold you up.
.../lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx
Outdated
Show resolved
Hide resolved
…orkspace_panel/geo_field_workspace_panel.tsx Co-authored-by: Michael Marcialis <michael@marcial.is>
flash1293
left a comment
There was a problem hiding this comment.
LGTM - tested and works fine. Thanks for this!
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsReferences to deprecated APIs
History
To update your PR or re-run it, just comment with: |
* [Lens] visualize in maps button * clean up dependency injection as suggested * add custom workspace render for geo fields * tslint and finish drag and drop for geo field * convert react class to function component * prevent page reload when clicking visualize in maps button * filter allFields instead of using condition to populate fieldTypeNames to fix tslint * clean up UI * fix jest test * globe illustration * UI cleanup * functional test * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx Co-authored-by: Michael Marcialis <michael@marcial.is> * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss Co-authored-by: Michael Marcialis <michael@marcial.is> * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx Co-authored-by: Michael Marcialis <michael@marcial.is> * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss Co-authored-by: Michael Marcialis <michael@marcial.is> * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss Co-authored-by: Michael Marcialis <michael@marcial.is> * Update x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx Co-authored-by: Michael Marcialis <michael@marcial.is> * updated globe svg * remove unused * better message for drop zone screen reader * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx Co-authored-by: Michael Marcialis <michael@marcial.is> * tslint Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Michael Marcialis <michael@marcial.is>
* [Lens] visualize in maps button * clean up dependency injection as suggested * add custom workspace render for geo fields * tslint and finish drag and drop for geo field * convert react class to function component * prevent page reload when clicking visualize in maps button * filter allFields instead of using condition to populate fieldTypeNames to fix tslint * clean up UI * fix jest test * globe illustration * UI cleanup * functional test * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx Co-authored-by: Michael Marcialis <michael@marcial.is> * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss Co-authored-by: Michael Marcialis <michael@marcial.is> * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx Co-authored-by: Michael Marcialis <michael@marcial.is> * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss Co-authored-by: Michael Marcialis <michael@marcial.is> * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.scss Co-authored-by: Michael Marcialis <michael@marcial.is> * Update x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx Co-authored-by: Michael Marcialis <michael@marcial.is> * updated globe svg * remove unused * better message for drop zone screen reader * Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/geo_field_workspace_panel.tsx Co-authored-by: Michael Marcialis <michael@marcial.is> * tslint Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Michael Marcialis <michael@marcial.is> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Michael Marcialis <michael@marcial.is>
|
Hi! I'm just popping in after doing some 7.14 testing. I like that the field is shown in the listing and can be accessed as a way to navigate to Maps: it's a nice, streamlined process users may even learn to access intentionally. Great work! |
Closes #80078
Show geo_point and geo_shape fields in Lens field list. Add visualize in maps button in field details. PR also shows a custom workspace panel when users drag geo fields into the workspace. The workspace panel has a drop zone that when the field is dropped into the zone, takes users to the maps application.