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

Breaking change between 21.1.0 and 21.3.2 #830

Closed
timroes opened this issue Sep 22, 2020 · 4 comments · Fixed by elastic/kibana#79226
Closed

Breaking change between 21.1.0 and 21.3.2 #830

timroes opened this issue Sep 22, 2020 · 4 comments · Fixed by elastic/kibana#79226

Comments

@timroes
Copy link

timroes commented Sep 22, 2020

There has been an actual breaking change in API between those versions. Earlier the props passed into a customTooltip component in the setting would have props.values[0].value being the formatted string, now it's the raw value and .formattedValue is the formatted string. The behavior of course makes imho more sense that way, but it was nevertheless an API breakage.

It could have been caused by #810, but it could also be linked together with some other PRs, that touched tooltip, and this one was just the one introducing .formattedValue.

cc @markov00

@nickofthyme
Copy link
Collaborator

@timroes you are correct this was caused by #810, from the changes below as of v21.1.1

-   value: tickFormatter(value, tickFormatOptions),
+   value,    
+   formattedValue: tickFormatter(value, tickFormatOptions),

That is entirely my fault, I should have seen that and kept the value as formatted with a new rawValue or something.

Do you think I should deprecate all prior versions and make a new major release?

Breaking versions:

@markov00
Copy link
Member

I think that's the only 'clean' way to fix that

nickofthyme added a commit that referenced this issue Sep 22, 2020
breaking change caused by changes in #810 see #830 for more info

BREAKING CHANGE: `TooltipValue.value` is now raw value and `TooltipValue.formattedValue` is now the
string formatted value.

fix #810
markov00 pushed a commit that referenced this issue Sep 22, 2020
# [22.0.0](v21.3.2...v22.0.0) (2020-09-22)

### Bug Fixes

* breaking change in patch release of 21.1.1 ([d0ddc45](d0ddc45)), closes [#810](#810)

### BREAKING CHANGES

* caused by changes in #810 see #830 for more info
* `TooltipValue.value` is now raw value and `TooltipValue.formattedValue` is now the
string formatted value.
@nickofthyme
Copy link
Collaborator

Fixed by d0ddc45

@nickofthyme
Copy link
Collaborator

Updated release logs to indicate version deprecations and updated release notes for v22.0.0

image

darnautov pushed a commit to darnautov/elastic-charts that referenced this issue Sep 22, 2020
breaking change caused by changes in elastic#810 see elastic#830 for more info

BREAKING CHANGE: `TooltipValue.value` is now raw value and `TooltipValue.formattedValue` is now the
string formatted value.

fix elastic#810
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants