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

[Lens] Share link feature in Lens #147863

Closed
wants to merge 37 commits into from
Closed

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Dec 20, 2022

Summary

Fixes #75316

  • Lens
    • Refactored Top nav actions code to be more modular
    • Created new Locator object for Lens
      • Enabled server side to make Short URL work with it
      • Added unit tests for it
    • Extended getEditPath to support filters and refreshInterval
    • Extended mounting code in Lens to handle a new type of incoming context
      • This produced a discrete amount of branching, due to inconsistency of the context type coming from different sources (Discover, Agg-based/TSVB, Lens itself...). Perhaps it's worth discussing having a refactoring of the context type here?
  • Add new Share action
    • Added new objectTypeTitle prop to have custom titles on Share popover
    • Replaced the Download CSV action and move it as menu item
      • Refactor code into share item provider + (lazy) panel content
      • Add debug flag to make CSV download testable
      • Add functional tests for CSV download
    • Add Permalink action
      • Integrate Permalink with Short URL service
        • Tweaked Permalink action to work with SO custom URL
        • Tweaked Permalink action to handle disabled state
        • Updated unit tests with new features
  • New share function test suite created
    • Extended browser service with a new method to have a blank tab in browser
    • New helper functions in Lens to test Share feature

Screenshot 2023-01-11 at 12 58 30

Screenshot 2023-01-11 at 12 58 36

Screenshot 2023-01-11 at 12 58 40

Screenshot 2023-01-11 at 12 58 46

Screenshot 2023-01-11 at 12 59 03

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@cla-checker-service
Copy link

❌ Author of the following commits did not sign a Contributor Agreement:
39a9e8b, e2d3ac9

Please, read and sign the above mentioned agreement if you want to contribute to this project

@dej611
Copy link
Contributor Author

dej611 commented Jan 10, 2023

@elasticmachine merge upstream

@dej611 dej611 added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens release_note:feature Makes this part of the condensed release notes v8.7.0 labels Jan 11, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 887 892 +5

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
lens 599 602 +3
share 56 59 +3
total +6

Async chunks

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

id before after diff
lens 1.3MB 1.3MB +5.5KB

Page load bundle

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

id before after diff
lens 30.5KB 33.8KB +3.3KB
share 50.8KB 51.3KB +429.0B
total +3.8KB
Unknown metric groups

API count

id before after diff
lens 695 698 +3
share 115 118 +3
total +6

async chunk count

id before after diff
lens 14 15 +1

History

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

@dej611
Copy link
Contributor Author

dej611 commented Jan 12, 2023

Closing in favour of #148829 to solve the CLA issue with those 2 commits.

@dej611 dej611 closed this Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:feature Makes this part of the condensed release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Ability to share a visualization link from Lens
3 participants