Skip to content

BAM-2584 AMP-Smartlinks#3

Merged
PhilWinchester merged 16 commits intoamp-smartlinks-0.1from
BAM-2584
Jan 23, 2019
Merged

BAM-2584 AMP-Smartlinks#3
PhilWinchester merged 16 commits intoamp-smartlinks-0.1from
BAM-2584

Conversation

@PhilWinchester
Copy link
Copy Markdown

@PhilWinchester PhilWinchester commented Jan 10, 2019

Putting this up now for early review. There are a few things that still need to be changed but the majority of the behavior is set. Anything under link-rewriter is the "shared" functionality with Skimlinks and can't be touched.

TODO

  • Fix runSmartlinks to correctly detect change in anchorList.
    • Make sure tests assert this.
  • Insert our extensions LinkRewriter with priority.
    • The client does this in a meta tag.
  • Add better validation to getConfigOptions.
  • Revisit tests to clean up/simplify some of the test I first wrote.
  • Add code comments to functions to explain the flow of the extension better.
  • Add Readme.

Copy link
Copy Markdown

@csdev csdev left a comment

Choose a reason for hiding this comment

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

LGTM pending minor fixes and additional review

></amp-smartlinks>


<div class="linkmate-eligible-links">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

maybe drop -links

- PhilWinchester
- pbecotte
- c-nichols
- zhouyx
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this an AMP person?

Copy link
Copy Markdown
Author

@PhilWinchester PhilWinchester Jan 16, 2019

Choose a reason for hiding this comment

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

yep. Threw the responder to the issue in for now but will probably change later

@PhilWinchester PhilWinchester force-pushed the BAM-2584 branch 4 times, most recently from 1efd884 to 21078bd Compare January 23, 2019 20:17
@PhilWinchester PhilWinchester merged commit d707dc1 into amp-smartlinks-0.1 Jan 23, 2019
@PhilWinchester PhilWinchester deleted the BAM-2584 branch January 23, 2019 20:36
PhilWinchester added a commit that referenced this pull request Jan 24, 2019
* adding example page and amp-smartlinks to bundles.config

* creating amp-smartlinks scaffolding

* BAM-2584 adding hardcoded POC implementation of amp-smartlinks

* adding new constants file and linkmate file/class

* adding linkmate call and association working with link-rewrite service

* add amp config call and update workflow to use those values

* setup initial amp-smartlinks and linkmate workflow

* adding new config variables for link attribute and selector

* add tests for amp-smartlinks

* add test for linkmate.js

* add more thorough anchorList check in runSmartlinks

* adding code comments, new constants structure and better options validation

* update amp-smartlinks to have helpful information

* updating global vars and cleaning up main files

* clean up tests and add more explicit type assertions

* clean up jsdoc tags
PhilWinchester pushed a commit that referenced this pull request Jan 25, 2019
* adding example page and amp-smartlinks to bundles.config

* creating amp-smartlinks scaffolding

* BAM-2584 adding hardcoded POC implementation of amp-smartlinks

* adding new constants file and linkmate file/class

* adding linkmate call and association working with link-rewrite service

* add amp config call and update workflow to use those values

* setup initial amp-smartlinks and linkmate workflow

* adding new config variables for link attribute and selector

* add tests for amp-smartlinks

* add test for linkmate.js

* add more thorough anchorList check in runSmartlinks

* adding code comments, new constants structure and better options validation

* update amp-smartlinks to have helpful information

* updating global vars and cleaning up main files

* clean up tests and add more explicit type assertions

* clean up jsdoc tags
PhilWinchester pushed a commit that referenced this pull request Jan 31, 2019
* adding example page and amp-smartlinks to bundles.config

* creating amp-smartlinks scaffolding

* BAM-2584 adding hardcoded POC implementation of amp-smartlinks

* adding new constants file and linkmate file/class

* adding linkmate call and association working with link-rewrite service

* add amp config call and update workflow to use those values

* setup initial amp-smartlinks and linkmate workflow

* adding new config variables for link attribute and selector

* add tests for amp-smartlinks

* add test for linkmate.js

* add more thorough anchorList check in runSmartlinks

* adding code comments, new constants structure and better options validation

* update amp-smartlinks to have helpful information

* updating global vars and cleaning up main files

* clean up tests and add more explicit type assertions

* clean up jsdoc tags
PhilWinchester pushed a commit that referenced this pull request Jan 31, 2019
* adding example page and amp-smartlinks to bundles.config

* creating amp-smartlinks scaffolding

* BAM-2584 adding hardcoded POC implementation of amp-smartlinks

* adding new constants file and linkmate file/class

* adding linkmate call and association working with link-rewrite service

* add amp config call and update workflow to use those values

* setup initial amp-smartlinks and linkmate workflow

* adding new config variables for link attribute and selector

* add tests for amp-smartlinks

* add test for linkmate.js

* add more thorough anchorList check in runSmartlinks

* adding code comments, new constants structure and better options validation

* update amp-smartlinks to have helpful information

* updating global vars and cleaning up main files

* clean up tests and add more explicit type assertions

* clean up jsdoc tags
PhilWinchester pushed a commit that referenced this pull request Feb 14, 2019
* adding example page and amp-smartlinks to bundles.config

* creating amp-smartlinks scaffolding

* BAM-2584 adding hardcoded POC implementation of amp-smartlinks

* adding new constants file and linkmate file/class

* adding linkmate call and association working with link-rewrite service

* add amp config call and update workflow to use those values

* setup initial amp-smartlinks and linkmate workflow

* adding new config variables for link attribute and selector

* add tests for amp-smartlinks

* add test for linkmate.js

* add more thorough anchorList check in runSmartlinks

* adding code comments, new constants structure and better options validation

* update amp-smartlinks to have helpful information

* updating global vars and cleaning up main files

* clean up tests and add more explicit type assertions

* clean up jsdoc tags
PhilWinchester pushed a commit that referenced this pull request Feb 26, 2019
* adding example page and amp-smartlinks to bundles.config

* creating amp-smartlinks scaffolding

* BAM-2584 adding hardcoded POC implementation of amp-smartlinks

* adding new constants file and linkmate file/class

* adding linkmate call and association working with link-rewrite service

* add amp config call and update workflow to use those values

* setup initial amp-smartlinks and linkmate workflow

* adding new config variables for link attribute and selector

* add tests for amp-smartlinks

* add test for linkmate.js

* add more thorough anchorList check in runSmartlinks

* adding code comments, new constants structure and better options validation

* update amp-smartlinks to have helpful information

* updating global vars and cleaning up main files

* clean up tests and add more explicit type assertions

* clean up jsdoc tags
PhilWinchester added a commit that referenced this pull request Mar 18, 2019
* creating new amp-smartlinks extension

* BAM-2584 AMP-Smartlinks (#3)

* adding example page and amp-smartlinks to bundles.config

* creating amp-smartlinks scaffolding

* BAM-2584 adding hardcoded POC implementation of amp-smartlinks

* adding new constants file and linkmate file/class

* adding linkmate call and association working with link-rewrite service

* add amp config call and update workflow to use those values

* setup initial amp-smartlinks and linkmate workflow

* adding new config variables for link attribute and selector

* add tests for amp-smartlinks

* add test for linkmate.js

* add more thorough anchorList check in runSmartlinks

* adding code comments, new constants structure and better options validation

* update amp-smartlinks to have helpful information

* updating global vars and cleaning up main files

* clean up tests and add more explicit type assertions

* clean up jsdoc tags

* BAM-2585 Whitelist import, fix type errors, and replace user.assert with userAssert (#4)

* BAM-2585 whitelist navigation import and fix type errors

* replace user.assert with userAssert

* BAM-2585 fix validator and type check (#5)

* more validator fixes (#6)

* BAM-2585 Fix validator, copyright, and whitespace (#7)

* alphabetize validator, fix whitespace, and add valid tag

* update year in copyright statement

* BAM-2585 move `link-rewriter` to import statements and updating types (#8)

* BAM-2585 remove link-rewriter and switch to importing from skimlinks extension

* clean up promise chain and more descriptive API comments

* update xhr to pull from ampdoc.win and add types to constants.js

* fix type in buildPageImpressionPayload_

* update validator with new empty value check (#9)

* update validator for exclusive-links

* switch page-impression API request to customEventReporter (#11)

* BAM-2585 fix jsdoc in linkmate-options and unnecessary param in page_impression request (#12)

* fix jsdoc for linkmate params and make runLinkmate more readable (#13)

* add try/catch on amp_config fetch and updated constants.js

* remove bad type in constants.js and add check for existing shop-links (#14)

* add check for auction_id in mapLinks and add jsdoc for SMARTLINKS_REWRITER_ID

* fix type notation in constants.js and linkmate-options.js

* fix indentation in example file

* add note to README describing link-rewriter priority queue behavior (#15)

* add exception to compile.js for amp-skimlinks

* update validator to use empty value as indicator linkmate param

* fix validator and linkmate-options to use new config style (#16)

* updating tests for linkmate-options.js

* remove redundant userAssert in linkmate-options

* update tests to reflect config changes

* update tests to send accurate config params

* update readme to refelct config changes and more accurate function names in linkmate-options
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.

4 participants