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

feat: custom annotation tooltip #727

Merged
merged 8 commits into from
Jul 6, 2020

Conversation

nickofthyme
Copy link
Collaborator

@nickofthyme nickofthyme commented Jun 30, 2020

Summary

Prop to render custom annotation tooltip or tooltip details. Add tooltip portal options for more control of placement, offset and boundary.

Depreciates renderTooltip prop in favor of customTooltipDetails prop.

Checklist

Delete any items that are not applicable to this PR.

  • Any consumer-facing exports were added to src/index.ts (and stories only import from ../src except for test data & storybook)
  • This was checked for cross-browser compatibility, including a check against IE11
  • Proper documentation or storybook story was added for features that require explanation or tutorials
  • Unit tests were updated or added to match the most common scenarios

@nickofthyme nickofthyme requested a review from markov00 June 30, 2020 04:45
@nickofthyme nickofthyme added :annotation Annotation (line, rect, text) related issue enhancement New feature or request labels Jun 30, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2020

Codecov Report

Merging #727 into master will increase coverage by 0.29%.
The diff coverage is 59.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #727      +/-   ##
==========================================
+ Coverage   74.19%   74.48%   +0.29%     
==========================================
  Files         267      282      +15     
  Lines        8599     8921     +322     
  Branches     1737     1788      +51     
==========================================
+ Hits         6380     6645     +265     
- Misses       2169     2220      +51     
- Partials       50       56       +6     
Impacted Files Coverage Δ
...c/chart_types/xy_chart/annotations/rect/tooltip.ts 89.47% <ø> (+4.47%) ⬆️
.../xy_chart/renderer/dom/annotations/annotations.tsx 67.92% <ø> (ø)
src/chart_types/xy_chart/utils/specs.ts 100.00% <ø> (ø)
src/components/portal/tooltip_portal.tsx 12.30% <ø> (ø)
src/components/portal/types.ts 100.00% <ø> (ø)
src/specs/settings.tsx 86.20% <ø> (ø)
...chart/renderer/dom/annotations/tooltip_content.tsx 13.63% <10.00%> (-7.80%) ⬇️
...rt/renderer/dom/annotations/annotation_tooltip.tsx 58.62% <58.33%> (-8.05%) ⬇️
src/chart_types/xy_chart/annotations/tooltip.ts 93.10% <90.00%> (-2.36%) ⬇️
src/components/portal/utils.ts 21.42% <100.00%> (ø)
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afd9f7d...2f15fa0. Read the comment docs.

@nickofthyme nickofthyme marked this pull request as ready for review June 30, 2020 17:57
Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

LGTM!

@markov00 markov00 merged commit 435c67c into elastic:master Jul 6, 2020
markov00 pushed a commit that referenced this pull request Jul 6, 2020
# [19.8.0](v19.7.0...v19.8.0) (2020-07-06)

### Bug Fixes

* set uninitialized state when removeSpec action is called ([#739](#739)) ([35b8caf](35b8caf)), closes [#723](#723) [#738](#738)

### Features

* **annotation:** enable marker positioning on LineAnnotation ([#737](#737)) ([ab5e413](ab5e413)), closes [#701](#701)
* add custom annotation tooltip ([#727](#727)) ([435c67c](435c67c))
@markov00
Copy link
Member

markov00 commented Jul 6, 2020

🎉 This PR is included in version 19.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Jul 6, 2020
@nickofthyme nickofthyme deleted the custom-annotation-tooltip branch July 8, 2020 13:12
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:annotation Annotation (line, rect, text) related issue enhancement New feature or request released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants