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

Update loader and yui to optionally use pathogen encoding #1950

Merged
merged 10 commits into from
Sep 12, 2014

Conversation

tripp
Copy link
Contributor

@tripp tripp commented Aug 27, 2014

Replaces #1858

Need to test cross browser.

Add `comboHander` config to yui for allowing the use of pathogen encoding logic.
Update loader to use pathogen encoding logic when `comboHandler` config is set.
Add `loader-pathogen-encoder` submodule.
Update build and meta files for `loader-pathogen-encoder` submodule.

 Changes to be committed:
	modified:   loader/build.json
	modified:   loader/js/loader.js
	modified:   loader/meta/loader.json
	modified:   yui/js/yui.js
@yahoocla
Copy link

CLA is valid!

}
//only encode if we have something to encode
if(comboSources) {
Copy link
Member

Choose a reason for hiding this comment

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

space after if, same below!

@caridy
Copy link
Member

caridy commented Aug 27, 2014

looking good so far!

@tripp
Copy link
Contributor Author

tripp commented Sep 11, 2014

@caridy @juandopazo
I think this may be about right. Let me know if either of you have any issues with this.


// Add the pathogen namespace to the combo base.
if (Y.config.customComboBase) {
customComboBase = Y.config.customComboBase + NAMESPACE;
Copy link
Member

Choose a reason for hiding this comment

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

why do we need to add p/ to customComboBase? why isn't that part of the original value? are we reusing that value for something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe the thought there is that Y.config.customComboBase will be set by the developer and the p/ added on by the loader allowing for different urls.

Y.config.customComboBase = "http://cdn.yahooapis.com/combo/";
Y.config.customComboBase = "https://cdn.yahooapis.com/combo/";

I suppose its just as easy to set the customComboBase with the p included.
https://cdn.yahooapis.com/p/

I can easily change that.

Copy link
Member

Choose a reason for hiding this comment

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

yes please.

@caridy
Copy link
Member

caridy commented Sep 11, 2014

I guess those are just cosmetic details +1
Also, travis is failing, we should check what's going on there.

//only encode if we have something to encode
if (hasComboModule) {
if (usePathogen) {
resolved = this._pathogenEncodeComboSources(resolved);
Copy link
Member

Choose a reason for hiding this comment

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

Mostly curious: why do these checks instead of just monkey-patching _encodeComboSources?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@caridy If you click on the details for the failure it actually shows the last build passing. Not sure why its claiming failure now. Previous failures were legit and due to a sort issue which the final commit fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@juandopazo I guess the only reason not to monkey-patch _encodeComboSources is that the two methods don't share a common interface. (signature)
We'd still have to do the first check hasComboModule either way though.

@tripp
Copy link
Contributor Author

tripp commented Sep 12, 2014

@caridy @juandopazo
I had to make another commit because loader was not falling back to the default combo when pathogen was specified but the customComboBase config was not.

@caridy
Copy link
Member

caridy commented Sep 12, 2014

🎱

@okuryu
Copy link
Member

okuryu commented Sep 29, 2014

Updated the HISTORY.md in dc3133d.

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

Successfully merging this pull request may close these issues.

5 participants