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

add polyfill for ChildNode remove #21797

Merged
merged 11 commits into from Aug 10, 2018
Merged

add polyfill for ChildNode remove #21797

merged 11 commits into from Aug 10, 2018

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Aug 8, 2018

fixes #21762

Adds polyfill for ChildNode.remove to support IE11

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese
Copy link
Contributor Author

nreese commented Aug 8, 2018

x-pack flaky reporting test

fail: "phantom BWC report generation into existing indexes existing 6_2 index multiple jobs posted"
19:46:58    │ proc  [ftr]        │        Error: expected 500 to equal 200

jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

* under the License.
*/

const childNodeRemove = require('childnode-remove');
Copy link
Member

Choose a reason for hiding this comment

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

my bad, const childNodeRemove = require('../node_modules/childnode-remove');


const childNodeRemove = require('childnode-remove');

childNodeRemove.polyfill();
Copy link
Member

Choose a reason for hiding this comment

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

I took a quick look at the lib, it doesn't check if remove is already defined. I'd do some light feature detection if possible, native code will most likely be quicker.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese nreese requested a review from LeeDr August 9, 2018 15:04
@nreese
Copy link
Contributor Author

nreese commented Aug 9, 2018

jenkins, test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded


/* eslint-disable */

// https://opensource.org/licenses/MIT
Copy link
Member

Choose a reason for hiding this comment

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

can you add the source for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you mean put the MIT license inline?

Copy link
Member

Choose a reason for hiding this comment

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

apologies, yup the license and copyright source. example

the "@notice" will make sure it gets added to our license output

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese
Copy link
Contributor Author

nreese commented Aug 9, 2018

jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese
Copy link
Contributor Author

nreese commented Aug 10, 2018

jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@LeeDr LeeDr left a comment

Choose a reason for hiding this comment

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

I tested these changes in IE 11 on Windows and it resolved the Dashboard problems. I could Add NEw Visualization and I could Remove a visualization from a dashboard without errors. There are some warnings in the console but they didn't impact functionality.

I did not review the code changes.

*
* The MIT License (MIT)
*
* Copyright (c) 2011-2015 Twitter, Inc
Copy link
Member

Choose a reason for hiding this comment

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

can we update this to Copyright (c) 2016-present, jszhou with a link to the github repo?

https://github.com/jserz/js_piece

@jbudz
Copy link
Member

jbudz commented Aug 10, 2018

Can we suffix the file with -polyfill to mostly follow the others?

@jbudz
Copy link
Member

jbudz commented Aug 10, 2018

Can we add this to tests_entry_template.js too?

LGTM after those 3, feel free to merge after green

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@nreese
Copy link
Contributor Author

nreese commented Aug 10, 2018

@jbudz CI keeps failing with

Running "run:verifyNotice" (run) task
18:04:48  info  Searching /var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-intake/kibana for multi-line comments starting with @notice
18:04:53  info  Found @notice comment in webpackShims/childnode-remove-polyfill.js
18:04:53  info  Found @notice comment in src/ui/public/flot-charts/index.js
18:04:53  info  Found @notice comment in src/ui/public/flot-charts/jquery.flot.log.js
18:04:53  info  Found @notice comment in src/ui/public/utils/decode_geo_hash.js
18:04:53  info  Found @notice comment in src/core_plugins/console/public/webpackShims/ui-bootstrap-custom.js
18:04:53  info  Found @notice comment in src/ui/public/styles/bootstrap/bootstrap.less
18:04:53  info  Found @notice comment in x-pack/plugins/graph/public/less/main.less
18:04:54  info  Found @notice comment in x-pack/plugins/ml/public/lib/angular_bootstrap_patch.js
18:04:54  info  Found @notice comment in x-pack/plugins/reporting/export_types/printable_pdf/server/lib/encode_uri_query.js
18:04:54  info  Found @notice comment in x-pack/plugins/reporting/export_types/printable_pdf/server/lib/pdf/assets/fonts/noto/index.js
18:04:54 ERROR  NOTICE.txt is out of date, run `node scripts/notice` to update and commit the results.
18:04:54 Warning: non-zero exit code 1� Use --force to continue.

Do you know where this is coming from?

@nreese
Copy link
Contributor Author

nreese commented Aug 10, 2018

ran node scripts/notice and that updated NOTICE.txt. Hopefully that will fix it

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@nreese nreese merged commit d605a9c into elastic:master Aug 10, 2018
nreese added a commit to nreese/kibana that referenced this pull request Aug 10, 2018
* add polyfill for ChildNode remove

* call polyfill function

* add files as suggested by jbudz

* remove checks around polyfill

* just use polyfill that mozilla recommends

* add MIT license to file

* suffix file with polyfill, update copyright and link to repo

* update notice.txt
nreese added a commit to nreese/kibana that referenced this pull request Aug 10, 2018
* add polyfill for ChildNode remove

* call polyfill function

* add files as suggested by jbudz

* remove checks around polyfill

* just use polyfill that mozilla recommends

* add MIT license to file

* suffix file with polyfill, update copyright and link to repo

* update notice.txt
nreese added a commit that referenced this pull request Aug 10, 2018
* add polyfill for ChildNode remove

* call polyfill function

* add files as suggested by jbudz

* remove checks around polyfill

* just use polyfill that mozilla recommends

* add MIT license to file

* suffix file with polyfill, update copyright and link to repo

* update notice.txt
nreese added a commit that referenced this pull request Aug 10, 2018
* add polyfill for ChildNode remove

* call polyfill function

* add files as suggested by jbudz

* remove checks around polyfill

* just use polyfill that mozilla recommends

* add MIT license to file

* suffix file with polyfill, update copyright and link to repo

* update notice.txt
cjcenizal pushed a commit to cjcenizal/kibana that referenced this pull request Aug 21, 2018
* add polyfill for ChildNode remove

* call polyfill function

* add files as suggested by jbudz

* remove checks around polyfill

* just use polyfill that mozilla recommends

* add MIT license to file

* suffix file with polyfill, update copyright and link to repo

* update notice.txt
cjcenizal pushed a commit to cjcenizal/kibana that referenced this pull request Aug 23, 2018
* add polyfill for ChildNode remove

* call polyfill function

* add files as suggested by jbudz

* remove checks around polyfill

* just use polyfill that mozilla recommends

* add MIT license to file

* suffix file with polyfill, update copyright and link to repo

* update notice.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard Add Visualization error in IE, Object doesn't support property or method 'remove'
4 participants