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

fix(ie11): replace fast-deep-equal with an internal copy IE11 safe #542

Merged
merged 1 commit into from
Feb 10, 2020

Conversation

markov00
Copy link
Member

Summary

This previous PR #534 introduced the fast_deep_equal library to avoid multiple rendering on charts.
Unfortunately, I didn't check if IE11 compatibility of the library during the PR review.
As described here: epoberezkin/fast-deep-equal#52 the library is not fully IE11 compatible if you just polyfill Maps/Sets. Some for...of loops are still there and can cause IE11 to fail if you don't transpile also the node modules.
I've copied the code + license inside the library as a first quick workaround.
We will definitely remove the function/library when fixing the double rendering internally on our reselector chain.

Checklist

Use strikethroughs to remove checklist items you don't feel are 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
  • Each commit follows the convention

@markov00 markov00 added the bug Something isn't working label Feb 10, 2020
@robgil
Copy link

robgil commented Feb 10, 2020

Codecov Report

Merging #542 into master will increase coverage by 0.30%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #542      +/-   ##
==========================================
+ Coverage   75.57%   75.88%   +0.30%     
==========================================
  Files         181      194      +13     
  Lines        5691     5879     +188     
  Branches     1104     1143      +39     
==========================================
+ Hits         4301     4461     +160     
- Misses       1374     1401      +27     
- Partials       16       17       +1     
Impacted Files Coverage Δ
src/mocks/series/utils.ts 88.88% <0.00%> (ø)
src/mocks/series/data.ts 100.00% <0.00%> (ø)
src/mocks/scale/scale.ts 87.50% <0.00%> (ø)
src/mocks/series/seriesIdentifiers.ts 93.33% <0.00%> (ø)
src/mocks/utils.ts 100.00% <0.00%> (ø)
src/utils/fast_deep_equal.ts 87.87% <0.00%> (ø)
src/mocks/series/index.ts 100.00% <0.00%> (ø)
src/mocks/hierarchical/palettes.ts 100.00% <0.00%> (ø)
src/mocks/index.ts 100.00% <0.00%> (ø)
src/mocks/specs/index.ts 100.00% <0.00%> (ø)
... and 3 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 1a73e4a...9beb564. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Feb 10, 2020

Codecov Report

Merging #542 into master will increase coverage by 0.3%.
The diff coverage is 91.3%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #542     +/-   ##
=========================================
+ Coverage   75.57%   75.88%   +0.3%     
=========================================
  Files         181      194     +13     
  Lines        5691     5879    +188     
  Branches     1104     1143     +39     
=========================================
+ Hits         4301     4461    +160     
- Misses       1374     1401     +27     
- Partials       16       17      +1
Impacted Files Coverage Δ
src/components/legend/legend_item.tsx 100% <100%> (ø) ⬆️
..._types/xy_chart/renderer/canvas/bar_geometries.tsx 28.94% <100%> (ø) ⬆️
...types/xy_chart/renderer/canvas/rect_annotation.tsx 42.85% <100%> (ø) ⬆️
...types/xy_chart/renderer/canvas/line_geometries.tsx 27.77% <100%> (ø) ⬆️
src/chart_types/xy_chart/renderer/canvas/axis.tsx 21.6% <100%> (ø) ⬆️
src/chart_types/xy_chart/renderer/canvas/grid.tsx 48.64% <100%> (ø) ⬆️
src/components/icons/icon.tsx 100% <100%> (ø) ⬆️
...hart_types/xy_chart/renderer/canvas/bar_values.tsx 42.5% <100%> (ø) ⬆️
...types/xy_chart/renderer/canvas/line_annotation.tsx 35.29% <100%> (ø) ⬆️
src/components/chart_container.tsx 56.45% <100%> (ø) ⬆️
... and 17 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 1a73e4a...9beb564. Read the comment docs.

Copy link
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

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

LGTM, Tested playground locally in IE11 with no console errors.

@markov00 markov00 merged commit 2a02d7d into elastic:master Feb 10, 2020
markov00 added a commit to markov00/elastic-charts that referenced this pull request Feb 10, 2020
markov00 pushed a commit that referenced this pull request Feb 10, 2020
## [17.0.3](v17.0.2...v17.0.3) (2020-02-10)

### Bug Fixes

* **ie11:** replace fast-deep-equal with an internal copy IE11 safe ([#542](#542)) ([2a02d7d](2a02d7d))
@markov00
Copy link
Member Author

🎉 This PR is included in version 17.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Feb 10, 2020
markov00 pushed a commit that referenced this pull request Feb 10, 2020
## [16.1.2](v16.1.1...v16.1.2) (2020-02-10)

### Bug Fixes

* **ie11:** replace fast-deep-equal an IE11 safe ver ([#542](#542)) ([#546](#546)) ([0c334ca](0c334ca))
@markov00 markov00 deleted the 2020-02-10_ie11_safe_deep_equal branch November 25, 2020 11:46
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
## [17.0.3](elastic/elastic-charts@v17.0.2...v17.0.3) (2020-02-10)

### Bug Fixes

* **ie11:** replace fast-deep-equal with an internal copy IE11 safe ([opensearch-project#542](elastic/elastic-charts#542)) ([d202d7b](elastic/elastic-charts@d202d7b))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants