-
Notifications
You must be signed in to change notification settings - Fork 10
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 web components of patternfly to custom elements v1 #40
Conversation
@@ -5,7 +5,8 @@ | |||
<link rel="stylesheet" href="../dist/css/patternfly.css"> | |||
<link rel="stylesheet" href="../dist/css/patternfly-additions.css"> | |||
<link rel="stylesheet" href="../dist/css/patternfly-webcomponents.css"> | |||
<script src="//cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.22/webcomponents.js"></script> | |||
<script src="https://rawgit.com/webcomponents/webcomponentsjs/master/webcomponents-lite.js"></script> |
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.
You may want to use webcomponents-loader.js in place of webcomponents-lite. It will more reflect the real world usage of web components
@dabeng I see you are using the bundled webcomponents-lite.js that comes with pf. It ships the v0 polyfill and thus is inoperable with v1 webcomponents. Use this instead: /~https://github.com/WebComponents/webcomponentsjs#webcomponents-loaderjs |
@dabeng great job getting us started w/ v1! It looks like you've updated the WCs to use the new v1 API. Can you please provide your Travis fork / test pages once done? I think we will definitely need to test the v1 components across browsers and see if anything has changed. |
@Agathver @priley86 Thanks a lot for your review. Could you give advice about how to get the tests to run? In other words, how to modify karma.conf.js file? |
@dabeng the polyfill you are including supports only the web components v0 spec. Use v1 of the webcomponent polyfill via the webcomponents loader I mentioned above. This should make your tests pass if everything else is okay. You need to download a copy of webcomponents -lite.js v1 from /~https://github.com/WebComponents/webcomponentsjs and reference it inside karma.conf.js |
Yep... agreed on the karma updates. I think we can safely move to the If you want to quickly test via CDN, it looks like those scripts exist here: |
@Agathver @priley86 , thank you for your great recommendations, but I still can't get rid of the following errors after I run "gulp test". Any solutions? I'' appreciate very much 😊 |
See: ariya/phantomjs#13895 |
@dabeng i think we should try to reference the polyfill from I tried testing this branch in Karma w/ Chrome & Phantom JS just now... A couple observations:
FWIW, we've had so many problems w/ Phantom in the past that I'd be completely in favor of removing this restriction and leaving Phantom. It regularly does not properly represent the other browsers, and that's why it seems a lot of open source projects have moved to tools like Sauce Labs which gives us Selenium...and most importantly, real browsers to test with in an automated way! It's becoming a barrier to us moving forward w/ the spec...so I'm in favor of removing Phantom. We can of course keep tabs on this issue and revisit it though. We can also try to target thoughts @bleathem ? |
further detail on the polyfill breakage... It's using We could try polyfilling Set and see where that gets us... Another thing we may consider is switching off Phantom to Headless Chrome... https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md Thanks to Luke Dary for this suggestion! |
Can we look at using headless chrome instead of PhantomJS? |
Headless chrome is a great solution. Glad that Chromium is packaging it out-of-the box. But, we have to wait till Chrome 59. Currently the pf dependencies also bring SlimerJS - which is used for headless testing in Firefox, may be we should be testing in Firefox too. |
You are right. In fact, I recommend every developer of patternfly-webcomponents to use the following configuration snippets in karma.conf.js file:
At the same time, we need to install the following launchers firstly:
Apparently, installing various browsers can not be imperative, so I didn't do that in this patch. |
@priley86 , travis fork isn't generated this time due to the following error:
|
Due to some recent security issue regarding accidental leaking of OAuth tokens in Travis build logs, GitHub has revoked all OAuth tokens used in Travis. You need to add a new personal access token in the AUTH_TOKEN environment variable. The process is highlighted here: /~https://github.com/patternfly-webcomponents/patternfly-webcomponents/blob/master/TESTS.md#enabling-travis-builds |
@dlabrecq can you update the OAUTH token here too? |
this is great! let's merge... |
@dabeng one more minor request before i forget...can we update TESTS.md to reflect new changes for debugging Karma (as you noted in comments above)? |
@priley86 , please review TESTS.md :) |
The AUTH_TOKEN has been updated for patternfly-webcomponents. However, your personal AUTH_TOKEN still needs to be updated in order to run Travis and generate a master-dist branch for personal forks. |
Nice work, thanks @dabeng! |
@bleathem @priley86 , would you like to review this PR?
FYI, https://rawgit.com/dabeng/patternfly-webcomponents/ce-v1-dist/index.html