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] fix save to maps for by_value map embeddables #102968

Merged
merged 3 commits into from
Jun 23, 2021

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Jun 22, 2021

Fixes #99560

To view problem

  1. install sample data set
  2. create dashboard
  3. create map from dashboard and return to dashboard
  4. in the dashboard map panel open list, click "Edit map".
  5. Click "save in maps". Unselect add to dashboard. Click save
  6. notice that the map was not saved or converted from by_value to by_reference.

This PR resolves the problem by properly passing addToLibrary flag to savedMap.save

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Tested this in 7.13.2 and did see the issue. Tested it again with this fix, and the map is added to the library / the maps app.

This addresses the last point in #99560, which is the most major discrepancy. Thanks for tackling this!

I wonder if we should add an additional functional test to https://github.com/elastic/kibana/blob/master/x-pack/test/functional/apps/dashboard/dashboard_maps_by_value.ts to ensure that this sort of thing doesn't happen again.

@nreese
Copy link
Contributor Author

nreese commented Jun 22, 2021

This addresses the last point in #99560, which is the most major discrepancy. Thanks for tackling this!

Thanks for pointing out #99560. I had forgettn about this issue but ya, this explains all of what is going on.

I have pushed a change to address the point "When clicking save to library or save to maps when editing a panel by value, Visualize and Lens, show the save as dialog with the option to update Panel on dashboard. In Maps, the option reads Add to dashboard after saving". Now the dialog will also say "update Panel on dashboard" in maps.

Screen Shot 2021-06-22 at 3 18 49 PM

All of #99560 should be addressed now. I will update the PR description to state that this PR fixes #99560

@nreese nreese added auto-backport Deprecated - use backport:version if exact versions are needed and removed v7.13.3 labels Jun 22, 2021
@ThomThomson
Copy link
Contributor

That's awesome! Thanks again!

@nreese
Copy link
Contributor Author

nreese commented Jun 23, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
maps 3.1MB 3.1MB +415.0B

History

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

Copy link
Contributor

@kindsun kindsun 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 fixing this 🙇

  • code review
  • tested locally in chrome

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 23, 2021
* [Maps] fix save to maps for by_value map embeddables

* show the save as dialog with the option to update Panel on dashboard

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 25, 2021
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 26, 2021
kibanamachine added a commit that referenced this pull request Jun 26, 2021
* [Maps] fix save to maps for by_value map embeddables

* show the save as dialog with the option to update Panel on dashboard

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:fix v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Maps] [Visualize] Slight Inconsistencies with By Value Save Behaviours
5 participants