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

Adding support for data uris in resolveUrl. #5199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicolasnoble
Copy link

Fixes #5198.

<script src="../../../webcomponentsjs/webcomponents-loader.js"></script>
<script src="../../../web-component-tester/browser.js"></script>
<link rel="import" href="../../polymer.html">
<link rel="import" href="data:text/html,%3Cdom-module%20id%3D%22element-data-uri%22%3E%3Cscript%3EPolymer(%7Bis%3A%22element-data-uri%22%2Cproperties%3A%7Bexists%3A%7Btype%3ABoolean%2Cvalue%3Atrue%7D%7D%7D)%3C%2Fscript%3E%3C%2Fdom-module%3E">
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to put this into code with the URLencode? That would make the test more readable and understandable.

Copy link
Author

Choose a reason for hiding this comment

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

Possibly, yes. I can try at least :-)

Copy link
Author

Choose a reason for hiding this comment

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

Updated; PTAL.

Copy link
Author

Choose a reason for hiding this comment

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

Actually, what I attempted (visible here) works locally, but seems to timeout on tests on your travis environment. I'm not sure how to do this otherwise.

Copy link
Author

Choose a reason for hiding this comment

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

@nicolasnoble nicolasnoble force-pushed the data-uri branch 2 times, most recently from b624a30 to b7fddd7 Compare April 17, 2018 22:17
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@TimvdLippe
Copy link
Contributor

I had another stab at it and it is indeed failing. I will need to run this on Sauce later to debug 😢

@nicolasnoble
Copy link
Author

My guess is the onload trick isn't properly working everywhere for all browsers, but I am not sure how to solve it.

Worst case scenario, for readability, it might be relevant to just add a comment next to the link that shows what its contents are.

Also I would believe the test would be more relevant to use a Polymer component because that way it exercises the resolveURL codepath - your attempt doesn't.

I can rearrange my original PR to add the comment block if you want.

@TimvdLippe
Copy link
Contributor

TimvdLippe commented Apr 18, 2018 via email

@googlebot
Copy link

CLAs look good, thanks!

@nicolasnoble
Copy link
Author

Yep, I have the same experience: it works fine locally for me too, so I don't exactly know what's going on with the CI... Oh well :-)

I've updated the original PR to add a comment. PTAL.

Copy link
Contributor

@TimvdLippe TimvdLippe left a comment

Choose a reason for hiding this comment

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

This LGTM. Holding off merging for now until the 3.x branch work has finished. We can incorporate it there 👍

@nicolasnoble
Copy link
Author

Sure. Is there going to be a planned Polymer 2.0 release with this fix possibly in there however ? I wouldn't like to have to upgrade my project immediately to Polymer 3.0 just to get this fix in there.

@TimvdLippe
Copy link
Contributor

Hm, I am actually not sure what happens in that case. I will discuss with the others and see what we can do!

@nicolasnoble
Copy link
Author

Okay, thanks. I mean, most of the time, substantials projects still get "maintenance fixes and releases" for a little while before abandoning the previous version, and Polymer 2.6.0 got released less than a month ago. It'd be quite harsh to drop support for it, forcing people to migrate to get fixes like this one in there.

I mean, I could still monkey-patch my Polymer 2.6.0 during postinstall to incorporate this fix instead of waiting on a hypothetical 2.6.1, but I'd rather not.

@TimvdLippe
Copy link
Contributor

Yeah I am definitely not saying we are dropping support, we simply havent decided yet what our plans are. We still support 1.x with bug fixes, so we will for certain do that with 2.x as well.

@nicolasnoble
Copy link
Author

Cool, thanks! :)

nicolasnoble added a commit to nicolasnoble/papan that referenced this pull request Apr 19, 2018
@nicolasnoble
Copy link
Author

Gentle ping. I would actually love to see this one backported to the older polymer 2.x branch too.

@stale
Copy link

stale bot commented Mar 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 13, 2020
@nicolasnoble
Copy link
Author

Yeah it's stale alright.

@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Polymer doesn't handle data uri import links properly.
3 participants