-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Upgrade elastic charts v43.1.1 #121593
Merged
markov00
merged 38 commits into
elastic:main
from
nickofthyme:upgrade-charts-41-breaking
Jan 27, 2022
Merged
Upgrade elastic charts v43.1.1 #121593
Changes from 33 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
2b95c18
bump version
nickofthyme ab60941
fix breaking changes in partition charts
nickofthyme 40c513d
fix breaking changes in heatmap charts
nickofthyme d6e4973
fix more type errors
nickofthyme 76ac2f3
Merge branch 'main' into upgrade-charts-41-breaking
nickofthyme b9071a4
use workaround for eui blocking changes
nickofthyme da31c8e
fix pr check errors
nickofthyme 1d1ac03
fix pr check errors
nickofthyme 68f6d69
attempt fn test failure
nickofthyme a4c609d
Merge branch 'main' into upgrade-charts-41-breaking
nickofthyme f02912f
fix failed binding on heatmap convert formatter
nickofthyme bf3e4e4
Merge branch 'main' into upgrade-charts-41-breaking
kibanamachine 74b1118
fix breaking type changes from 42.0.0
nickofthyme 740c0ee
Merge branch 'main' into upgrade-charts-41-breaking
nickofthyme bf4d5ac
update jest snapshot from spec component changes
nickofthyme b0b14b4
Merge branch 'main' into upgrade-charts-41-breaking
nickofthyme 97a7bdb
fix failing jest snapshots
nickofthyme b2e65ba
Merge branch 'main' into upgrade-charts-41-breaking
nickofthyme 08dffcd
fix another jest snapshot
nickofthyme 3e8e1e1
Fix partition inner size
markov00 62b7a02
upgrade charts to fix heatmap issues
nickofthyme 82b7c9c
Merge branch 'main' into upgrade-charts-41-breaking
nickofthyme 2ad9966
fix package.json
nickofthyme db668f9
Merge branch 'main' into upgrade-charts-41-breaking
kibanamachine cade7ea
Merge branch 'main' into upgrade-charts-41-breaking
nickofthyme b1406f5
fix changes apm chart styles
nickofthyme 20fca8c
update new change on snapshots
nickofthyme 2dd35e4
Merge branch 'main' into upgrade-charts-41-breaking
kibanamachine d072367
Merge branch 'main' into upgrade-charts-41-breaking
nickofthyme 98597ab
fix issue with heatmap axes and legend labels
nickofthyme 81d7707
add ResizeObserver pollyfill to jest setup
nickofthyme 1418ec5
Merge branch 'main' into upgrade-charts-41-breaking
kibanamachine a6534d1
Merge branch 'main' into upgrade-charts-41-breaking
kibanamachine e10b732
Revert adding resize observer polyfill
markov00 f48385c
Merge remote-tracking branch 'upstream/main' into pr/121593
markov00 417c401
Update charts to 43.1.0
markov00 7daab93
Revert removal of resize-observer-polyfill
markov00 68e6570
Merge remote-tracking branch 'upstream/main' into pr/121593
markov00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,7 +103,7 @@ | |
"@elastic/apm-rum": "^5.10.1", | ||
"@elastic/apm-rum-react": "^1.3.3", | ||
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace", | ||
"@elastic/charts": "40.2.0", | ||
"@elastic/charts": "43.0.1", | ||
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath", | ||
"@elastic/elasticsearch": "npm:@elastic/[email protected]", | ||
"@elastic/ems-client": "8.0.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...xpressions/expression_gauge/public/components/__snapshots__/gauge_component.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 0 additions & 81 deletions
81
src/plugins/chart_expressions/expression_pie/public/utils/get_config.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we typically use
ResizeObserver
viaimport { ResizeObserver } from 'resize-observer-polyfill'
and not via the global. We don't currently do something like this in the browser, and if this polyfill is necessary for@elastic/charts
we should probably include the polyfill inpackages/kbn-ui-shared-deps-src/src/polyfills.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @spalger actually the ResizeObserver is supported by all major browsers we support and we don't need anymore the polyfill.
That's why I've removed the polyfill from the
@elastic/charts
package.The problem is that the
ResizeObserver
object is not available in thewindow
object of JSDOM when running the Jest test. Looks like it is not implemented in JSDOM@26.I don't think we need to include it into
packages/kbn-ui-shared-deps-src/src/polyfills.js
and I don't think I need to revert our changes in charts to bring back that polyfill. The polyfill should just live in the test environment because is not supported, but we should not include it in our distribution. What do you think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I've found the issue: in TS the
ResizeObserver
object is available as a global and it got compiled correctly.Instead, in JSDOM it is not global but is only a
window
object.I've changed the chart compiled code to use
window.ResizeObserver
instead and the tests are passing. I will push an update into charts soon to fix thatThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this doesn't solve the problem, I can't figure it ATM so I'm reverting back our commit in the elastic-charts and to include back again the polyfill.
This is anyway an issue that needs to be solved: JSDOM doesn't mock/support the ResizeObserver API, Kibana is using 3 years old with no commits resize-observer-polyfill library.