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

Refactor AmpContext dependencies for building #8258

Merged
merged 11 commits into from
Mar 23, 2017

Conversation

alanorozco
Copy link
Member

@alanorozco alanorozco commented Mar 20, 2017

#8087

  • Fixes typechecks for AmpContext
  • Extracts needed units from big modules with transitive deps.

@ampprojectbot
Copy link
Member

Hi, ampproject bot here! Here are a list of the owners that can approve your files.

You may leave an issue comment stating "@ampprojectbot retry!" to force me to re-evaluate this Pull Request's status

/to cramforce dvoytenko jridgewell

  • 3p/integration.js
  • tools/experiments/experiments.js

For any issues please file a bug at https://github.com/google/github-owners-bot/issues

@ampprojectbot
Copy link
Member

Hi, ampproject bot here! Here are a list of the owners that can approve your files.

You may leave an issue comment stating "@ampprojectbot retry!" to force me to re-evaluate this Pull Request's status

/to cramforce dvoytenko jridgewell

  • 3p/ampcontext.js
  • 3p/iframe-messaging-client.js
  • 3p/integration.js
  • gulpfile.js
  • tools/experiments/experiments.js

/to lannka zhouyx

  • ads/inabox/inabox-messaging-host.js

/to cramforce erwinmombay

  • build-system/amp.extern.js
  • build-system/tasks/presubmit-checks.js

/to dvoytenko jridgewell

  • src/3p-frame-messaging.js
  • src/3p-frame.js
  • src/event-helper-listen.js
  • src/event-helper.js
  • src/iframe-helper.js
  • src/inabox/inabox-viewport.js

/to alanorozco camelburrito chenshay choumx cvializ ericlindley-g erwinmombay gregable honeybadgerdontcare jridgewell kmh287 lannka mkhatib mrjoro muxin newmuis powdercloud zhouyx

  • test/functional/3p/test-iframe-messaging-client.js
  • test/functional/inabox/test-inabox-messaging-host.js
  • test/functional/test-3p-frame.js

For any issues please file a bug at https://github.com/google/github-owners-bot/issues

localElement = null;
wrapped = null;
};
return internalListenImplementation(
Copy link
Contributor

Choose a reason for hiding this comment

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

probably just move this out

Copy link
Member Author

Choose a reason for hiding this comment

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

As we discussed offline, the ideal fix would be to split event-helper in two.

However, loadPromise and listenOncePromise are included in 49 different files so I'd rather do that in a follow-up PR :)

(You can check this using grep -ilr -e loadPromise -e listenOncePromise src extensions 3p | wc -l)

Created #8316 to track this.

@alanorozco alanorozco changed the title Introduce experiment flag for new window.context implementation Refactor AmpContext for building. Mar 22, 2017
@alanorozco alanorozco changed the title Refactor AmpContext for building. Refactor AmpContext for building Mar 22, 2017
@alanorozco alanorozco changed the title Refactor AmpContext for building Refactor AmpContext dependencies for building Mar 22, 2017
Copy link
Member Author

@alanorozco alanorozco left a comment

Choose a reason for hiding this comment

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

Removed changes to integration.js to give the PR only one specific purpose.

Will re-introduce experiment flag in a follow-up PR.

localElement = null;
wrapped = null;
};
return internalListenImplementation(
Copy link
Member Author

Choose a reason for hiding this comment

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

As we discussed offline, the ideal fix would be to split event-helper in two.

However, loadPromise and listenOncePromise are included in 49 different files so I'd rather do that in a follow-up PR :)

(You can check this using grep -ilr -e loadPromise -e listenOncePromise src extensions 3p | wc -l)

Created #8316 to track this.

@alanorozco alanorozco merged commit c8f81fa into ampproject:master Mar 23, 2017
* @param {boolean=} opt_capture
* @return {!UnlistenDef}
*/
export function listen(element, eventType, listener, opt_capture) {
Copy link
Contributor

Choose a reason for hiding this comment

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

export {listen} from './event-helper-listen'

mrjoro pushed a commit to mrjoro/amphtml that referenced this pull request Apr 28, 2017
* Fix types for AmpContext

* Move and split dependencies for ampcontext-lib

* Enable type checks for ampcontext-lib
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.

5 participants