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

Added initial version of amp-anlaytics variable filters. #6560

Merged
merged 3 commits into from
Jan 10, 2017

Conversation

avimehta
Copy link
Contributor

@avimehta avimehta commented Dec 8, 2016

Closes #5621.

@avimehta avimehta force-pushed the revert-6542-revert-5621-filters branch from e4badf3 to 51e9f0e Compare December 8, 2016 20:21
Copy link
Contributor

@jridgewell jridgewell left a comment

Choose a reason for hiding this comment

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

Approving, assuming this is the same code minus the hasOwn changes?

@@ -46,6 +46,8 @@ variableServiceFor(AMP.win);

const MAX_REPLACES = 16; // The maximum number of entries in a extraUrlParamsReplaceMap

const hasOwn = Object.prototype.hasOwnProperty;
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be useful as a utility in /utils/object.js?

@avimehta
Copy link
Contributor Author

avimehta commented Dec 9, 2016

Yes. Following up on this. Given the large scale changes in this code and the fact that I am going to be ooo next few weeks, I'll submit this in Jan. I'll try and send out a PR to create a function in object.js tomorrow but the other filter changes will go in in Jan.

@jridgewell
Copy link
Contributor

👍

avimehta added a commit to avimehta/amphtml that referenced this pull request Dec 9, 2016
@avimehta avimehta mentioned this pull request Dec 9, 2016
jridgewell pushed a commit that referenced this pull request Dec 12, 2016
* Added hasOwn helper.

Branched from #6560

* Review feedback.
Lith pushed a commit to Lith/amphtml that referenced this pull request Dec 22, 2016
* Added hasOwn helper.

Branched from ampproject#6560

* Review feedback.
Lith pushed a commit to Lith/amphtml that referenced this pull request Dec 22, 2016
* Added hasOwn helper.

Branched from ampproject#6560

* Review feedback.
@avimehta avimehta force-pushed the revert-6542-revert-5621-filters branch 2 times, most recently from d5340e2 to 1f7f437 Compare January 6, 2017 00:40
@avimehta avimehta force-pushed the revert-6542-revert-5621-filters branch from 1f7f437 to 61ee6ca Compare January 6, 2017 17:46
@avimehta avimehta changed the title [WIP] Revert "Revert "Added initial version of amp-anlaytics variable filters."" Added initial version of amp-anlaytics variable filters. Jan 6, 2017
@avimehta
Copy link
Contributor Author

avimehta commented Jan 6, 2017

@jridgewell PTAL.

s.push(`${encodeURIComponent(k)}=${sv}`);
}
}

const paramString = s.join('&');
const paramString = s.length > 0 ? s.join('&') : '';
Copy link
Contributor

Choose a reason for hiding this comment

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

The ternary is unnecessary.

@avimehta avimehta merged commit 69c6baf into master Jan 10, 2017
jridgewell pushed a commit to jridgewell/amphtml that referenced this pull request Jan 31, 2017
@mrjoro mrjoro deleted the revert-6542-revert-5621-filters branch February 23, 2017 17:18
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.

2 participants