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

Move mutator interfaces to a separate service #25296

Closed
wants to merge 1 commit into from

Conversation

powerivq
Copy link
Contributor

@powerivq powerivq commented Oct 28, 2019

This PR moves the implementation of mutator functions into a separate service. Behaviors that are different are:

  1. The listener is moved to mutator:
      this.checkPendingChangeSize_(element);
    });

I believe it is okay, because all mutation requests start from mutator-impl. If mutator is not loaded, this logic should be a no-op anyways, so it does not alter the behavior.

  1. Added new public interfaces to resources-interface that are intended to be used by mutator only for the sake of refactoring. Plz take a look at that. It also is the cause of the bundle size increase.

  2. How should we deal with InaboxMutator? Do we want to run an experiment? I splitted InaboxResources as well, should it be kept on a separate PR?

  3. Maybe it is also a good idea to move changes to use resources to mutator in a separate PR?

@powerivq powerivq changed the title WIP Move mutator interfaces to a separate service [WIP] Move mutator interfaces to a separate service Oct 28, 2019
@powerivq powerivq force-pushed the refactor-mutator branch 2 times, most recently from 31b7ec9 to 5f1351a Compare October 31, 2019 17:38
@powerivq powerivq changed the title [WIP] Move mutator interfaces to a separate service Move mutator interfaces to a separate service Oct 31, 2019
@powerivq powerivq requested a review from lannka October 31, 2019 18:00
@powerivq powerivq force-pushed the refactor-mutator branch 4 times, most recently from 01b7e7d to fba17df Compare October 31, 2019 19:18
@amp-owners-bot
Copy link

amp-owners-bot bot commented Oct 31, 2019

Hey @gmajoulet, these files were changed:

  • extensions/amp-story/0.1/amp-story-consent.js
  • extensions/amp-story/0.1/amp-story-info-dialog.js
  • extensions/amp-story/0.1/test/test-amp-story-info-dialog.js
  • extensions/amp-story/1.0/amp-story-affiliate-link.js
  • extensions/amp-story/1.0/amp-story-embedded-component.js
  • extensions/amp-story/1.0/amp-story-info-dialog.js
  • extensions/amp-story/1.0/amp-story-page.js
  • extensions/amp-story/1.0/progress-bar.js
  • extensions/amp-story/1.0/test/test-amp-story-access.js
  • extensions/amp-story/1.0/test/test-amp-story-consent.js
  • extensions/amp-story/1.0/test/test-amp-story-embedded-component.js
  • extensions/amp-story/1.0/test/test-amp-story-info-dialog.js

Hey @newmuis, these files were changed:

  • extensions/amp-story/0.1/amp-story-consent.js
  • extensions/amp-story/0.1/amp-story-info-dialog.js
  • extensions/amp-story/0.1/test/test-amp-story-info-dialog.js
  • extensions/amp-story/1.0/amp-story-affiliate-link.js
  • extensions/amp-story/1.0/amp-story-embedded-component.js
  • extensions/amp-story/1.0/amp-story-info-dialog.js
  • extensions/amp-story/1.0/amp-story-page.js
  • extensions/amp-story/1.0/progress-bar.js
  • extensions/amp-story/1.0/test/test-amp-story-access.js
  • extensions/amp-story/1.0/test/test-amp-story-consent.js
  • extensions/amp-story/1.0/test/test-amp-story-embedded-component.js
  • extensions/amp-story/1.0/test/test-amp-story-info-dialog.js

@powerivq powerivq force-pushed the refactor-mutator branch 5 times, most recently from c18bbef to c617e95 Compare November 1, 2019 01:09
/**
* Schedules the work pass at the latest with the specified delay.
*/
schedulePassVsync() {}
Copy link
Contributor

Choose a reason for hiding this comment

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

@dvoytenko I'm wondering why we have schedulePass & schedlePassVsync. why do we need to batch in 2 different ways?

Copy link
Contributor

Choose a reason for hiding this comment

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

At this point it might be unnecessary. Initially this code likely dealt with inconsistencies with multi-browser event/rAF scheduling.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, created a clean up task to track: #25793

Copy link
Contributor

@lannka lannka left a comment

Choose a reason for hiding this comment

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

please do some manual testing with extensions that uses mutators in different environments.

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

Successfully merging this pull request may close these issues.

None yet

4 participants