profile
viewpoint
Eric Lewis ericandrewlewis Software Engineer @google New York, NY http://www.ericandrewlewis.com

push eventericandrewlewis/amphtml

Eric Lewis

commit sha e0df0acde918b6e7aec69916e3cf32e6473da78e

Correct comment

view details

push time in 4 days

pull request commentampproject/amphtml

Follow changes in the Event Timing API in Chrome 77.

@npm1 said:

LGTM though in the future we can move to just using PerformanceObserver with the buffered flag set (this is required for largest-contentful-paint, for example).

Sounds good. Is it safe to use the buffered: true option in a PerformanceObserverInit dictionary across Safari, FF, and older Chrome?

ericandrewlewis

comment created time in 4 days

push eventericandrewlewis/amphtml

Eric Lewis

commit sha f0e9563a2032b818aa2c4e56e8b0e1ea1899f003

Lint

view details

push time in 4 days

Pull request review commentampproject/amphtml

Follow changes in the Event Timing API in Chrome 77.

 describes.realWin('PeformanceObserver metrics', {amp: true}, env => {       });       delete env.win.PerformanceEventTiming;     });++    it('created before performance service registered for Chrome 77', () => {+      // Pretend that the EventTiming API exists.+      PerformanceObserverConstructorStub.supportedEntryTypes = ['first-input'];++      const entries = [+        {+          cancelable: true,+          duration: 8,+          entryType: 'first-input',+          name: 'mousedown',+          processingEnd: 105,+          processingStart: 103,+          startTime: 100,+        },+      ];+      const getEntriesByType = env.sandbox.stub();+      getEntriesByType.withArgs('first-input').returns(entries);+      getEntriesByType.returns([]);+      env.sandbox+        .stub(env.win.performance, 'getEntriesByType')+        .callsFake(getEntriesByType);++      installPerformanceService(env.win);++      const perf = Services.performanceFor(env.win);++      expect(perf.events_.length).to.equal(1);+      expect(perf.events_[0]).to.be.jsonEqual({+        label: 'fid',+        delta: 3,+      });++      delete env.win.PerformanceEventTiming;

Done in a8b3b8e8b0fe40cd95dea1f441d499dca8b995c8

ericandrewlewis

comment created time in 4 days

Pull request review commentampproject/amphtml

Follow changes in the Event Timing API in Chrome 77.

 describes.realWin('PeformanceObserver metrics', {amp: true}, env => {       });       delete env.win.PerformanceEventTiming;     });++    it('created before performance service registered for Chrome 77', () => {+      // Pretend that the EventTiming API exists.+      PerformanceObserverConstructorStub.supportedEntryTypes = ['first-input'];++      const entries = [+        {+          cancelable: true,+          duration: 8,+          entryType: 'first-input',+          name: 'mousedown',+          processingEnd: 105,+          processingStart: 103,+          startTime: 100,+        },+      ];+      const getEntriesByType = env.sandbox.stub();+      getEntriesByType.withArgs('first-input').returns(entries);+      getEntriesByType.returns([]);+      env.sandbox+        .stub(env.win.performance, 'getEntriesByType')+        .callsFake(getEntriesByType);++      installPerformanceService(env.win);++      const perf = Services.performanceFor(env.win);++      expect(perf.events_.length).to.equal(1);+      expect(perf.events_[0]).to.be.jsonEqual({+        label: 'fid',+        delta: 3,+      });++      delete env.win.PerformanceEventTiming;

Done in a8b3b8e8b0fe40cd95dea1f441d499dca8b995c8

ericandrewlewis

comment created time in 4 days

Pull request review commentampproject/amphtml

Follow changes in the Event Timing API in Chrome 77.

 export class Performance {       entryTypesToObserve.push('paint');     } -    if (this.win.PerformanceEventTiming) {+    if (this.supportsEventTimingAPIv76_) {       // Programmatically read once as currently PerformanceObserver does not       // report past entries as of Chrome 61.       // https://bugs.chromium.org/p/chromium/issues/detail?id=725567       this.win.performance.getEntriesByType('firstInput').forEach(processEntry);       entryTypesToObserve.push('firstInput');     } +    if (this.supportsEventTimingAPIv77_) {+      // Programmatically read once as currently PerformanceObserver does not

Done in a8b3b8e8b0fe40cd95dea1f441d499dca8b995c8

ericandrewlewis

comment created time in 4 days

push eventericandrewlewis/amphtml

Eric Lewis

commit sha a8b3b8e8b0fe40cd95dea1f441d499dca8b995c8

Prefer the PerformanceObserver buffered flag

view details

push time in 4 days

pull request commentampproject/amphtml

🚮 Removes `beforeunload` event use in performance impl

LGTM

wassgha

comment created time in 4 days

issue openedampproject/amphtml

Remove event listeners for Safari in Layout Jank reporting

We add event listeners for Safari to allow for reporting of Layout Jank on page exit via the beforeunload event (see code).

We want to remove beforeunload listeners to enable BFCache behavior for AMP pages, so we should remove these listeners.

Since the introduction of the recording of this metric, we started sending the metric more proactively. So adding the beforeunload listener is not critical.

created time in 5 days

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 16f14db3a595805129854902d5f7809a78bd3080

Fix test

view details

push time in 5 days

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 9bdfeeb7dc527120a3b1fc54faf04e8165850e34

Empty to trigger CI

view details

push time in 5 days

push eventericandrewlewis/amphtml

Eric Lewis

commit sha e50c4a779a98c1b9c2bce28a6c5ce9679ab7d101

Lint

view details

push time in 10 days

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 143c474b01d92334fd2a771a292d4fc5e1e601db

Follow changes in the Event Timing API in Chrome 77. Fixes #23900

view details

push time in 10 days

PR opened ampproject/amphtml

Follow changes in the Event Timing API in Chrome 77.

Fixes #23900

+90 -15

0 comment

2 changed files

pr created time in 10 days

push eventericandrewlewis/amphtml

Eric Lewis

commit sha faccb5bf0905fe97e9b94eb6a22adedd67692213

Follow changes in the Event Timing API in Chrome 77. Fixes #23900

view details

push time in 10 days

create barnchericandrewlewis/amphtml

branch : 23900

created branch time in 11 days

issue openedampproject/amphtml

Support First Input Delay changes in Chrome 77

The entryType for the first input delay PerformanceEntry is changing from firstInput to first-input in Chrome 77 (see chrome commit).

We should follow these changes while supporting both names across the new version release.

created time in 12 days

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 8b49a8dd21c1532696413b548f40e2b88eb650d8

Lint

view details

push time in 15 days

pull request commentampproject/amphtml

🐛 Follow type changes from `layoutShift` to `layout-shift`.

Is this PR still active?

Yes, sorry for the delay in updating!

ericandrewlewis

comment created time in 15 days

Pull request review commentampproject/amphtml

🐛 Follow type changes from `layoutShift` to `layout-shift`.

 export class Performance {         recordedFirstInputDelay = true;       } else if (entry.entryType === 'layoutJank') {         this.aggregateJankScore_ += entry.fraction;-      } else if (entry.entryType === 'layoutShift') {-        this.aggregateShiftScore_ += entry.value;+      } else if (entry.entryType === 'layout-shift') {

Thank you for catching this - added support for both versions in d569ea7f94acbfd062997def8d880b6351fb5727

ericandrewlewis

comment created time in 15 days

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 585b60bbfb3a34cc1dc3338ccc14e3584666c0fc

Merge branch 'master' into HEAD

view details

Eric Lewis

commit sha d569ea7f94acbfd062997def8d880b6351fb5727

Support layout shift API in both Chrome 76 and 77

view details

push time in 15 days

Pull request review commentampproject/amphtml

🐛 Follow type changes from `layoutShift` to `layout-shift`.

 export class Performance {         recordedFirstInputDelay = true;       } else if (entry.entryType === 'layoutJank') {         this.aggregateJankScore_ += entry.fraction;

I think this is okay for this case. Chrome 75 versions are turning down, and we'll soon have the user interaction-aware metrics in Chrome 77 in about a month.

ericandrewlewis

comment created time in 15 days

push eventericandrewlewis/amphtml

Victor Krapivin

commit sha 7729ae1bbfd39cf6276399dde59fcba290522512

✨Add RnetPlus ad exchange support to amp-ad (#22024) * amp-ad: adding RnetPlus ad exchange support * comments: 2019 year has been fixed * rnetplus: fixed formatting errors with CR/LF

view details

William Chou

commit sha 53730b2f4bb89e79d5d0c07b452565cee0167bee

amp-script: Allow removal of attributes (#23245) * Allow removal of attributes. * Flipped a condition. * == instead of ===.

view details

Hongfei Ding

commit sha 98479ffdf623c138577ec6cc54cbef6e12298c1e

Remove resources-impl.getViewport() (#23313) * Remove resources-impl.getViewport() * fix amp-ad-exit * address comments * fix * fix * fix test * fix test

view details

Gabriel Majoulet

commit sha 680499c2c973ab4c97efb314d1da2c4ac3bff3f3

Cleanup amp-force-prerender-visible-elements configuration files. (#23067)

view details

Gabriel Majoulet

commit sha 9679b22fb54e238b81754d752dbf5fc7b5dbf661

Loading amp-video poster on layout and not build. (#23360)

view details

Shihua Zheng

commit sha f4b5dfd755b4ffd5b75f41f0222ca3e31f64e9c9

AMP FIE CSS cleanup Doubleclick/Adsense experiment (#23401)

view details

Filip Stanis

commit sha c0b960afd1ef64804672896363924faffb325414

update email css (#23424)

view details

William Chou

commit sha 1a3aa2d177b7961656e364a602e656a635c5bed1

Clean up "margin-bottom-in-content-height" experiment (#23414) * Remove margin-bottom-in-content-height experiment. * Fix lint.

view details

Raghu Simha

commit sha fe82f7cb5c1b33e9ab94537c62401a57cca3c778

🏗✨ Upgrade closure compiler to v20190709 (#23417)

view details

Enrique Marroquin

commit sha 1a3eb267ffe210579e35f47af4346af795576adf

📈 Initial StorySpec Implementation (#23030) * initial storyspec implementation * Reviews * Improve readability. * Use map() for eventsPerPage_ * Move logic of updating event counts per page to the tracker. * fix dep error by moving StoryAnalytics to src/analytics * assert absence of selector and default to :root * fix typo * move getdetails back to the story side * reviews * add tests * split tests, only assert repeated field * dispatch the event using getRoot in the test

view details

Renovate Bot

commit sha 52e2144f01ee3e8c54b3d326becbf8a541beb367

📦 Update dependency tsickle to v0.36.0 (#23364)

view details

Renovate Bot

commit sha d47c1f3ef12b2db87047c6aea841ee519bc66b86

📦 Update babel monorepo to v7.5.5 (#23391)

view details

Renovate Bot

commit sha 1124642327fc85458e307abf3d699f16110690ba

📦 Update dependency fetch-mock to v7.3.7 (#23392)

view details

Ryan Cebulko

commit sha 80f8db33ea408f1b7cd7a5245dbf8a0984287186

Add badge for release-cherrypick-count metric (#23339)

view details

Renovate Bot

commit sha 31b92e9163eb1dff35ad7644b196e1de701564b7

📦 Update dependency eslint-plugin-jsdoc to v15.5.3 (#23394)

view details

Renovate Bot

commit sha 68cb0875bf1f80701f59346a56c5d893b61deeb2

📦 Update dependency gulp-if to v3 (#23397)

view details

Renovate Bot

commit sha e56521451f538dc2333a56dc9f7ae30e5dc13388

📦 Update dependency @octokit/rest to v16.28.5 (#23408)

view details

Renovate Bot

commit sha 4fa2a3fff693161112ce1d0d3731413a22702f71

📦 Update dependency mocha to v6.2.0 (#23415)

view details

Hongfei Ding

commit sha 9a39b6c848686540eddc11742f45d1e5cb0a2b78

Move getElementLayoutBox (#23418) * Remove getElementLayoutBox out of resources-impl to amp-auto-ads. * woops * Add tests * nit * type check * presubmit * Fix tests * lint

view details

Justin Ridgewell

commit sha cc82c765e5e5fae50a632ee45052c012f90902da

Mark collapse attempt denied as an expected error (#23380) Fixes https://github.com/ampproject/amphtml/issues/20935

view details

push time in 15 days

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 4b2d74678d8efd51abb8d001eb94b391988ef389

empty

view details

push time in a month

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 556601720993e4ed14fa594804c3db523f12bf64

Add LayoutShift type definition in Closure Compiler

view details

push time in a month

CommitCommentEvent

push eventericandrewlewis/amphtml

Eric Lewis

commit sha d5c9e067707f732a0aa77a5a34d7c09c1051e8fa

Lint fixes

view details

push time in a month

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 5841683ba6d4b061cc9a92dc25b28580ab99e31a

Follow changes in Layout Instability API. - Ignore layout shift that occurs within 500ms of user input - Create a separate PerformanceObserver to capture layout shift before the PerfomanceObserver is created

view details

push time in a month

CommitCommentEvent

pull request commentampproject/amphtml

🐛 Follow type changes from `layoutShift` to `layout-shift`.

I realized there's a few other changes in the spec other than this - going to follow-up with a few more commits.

ericandrewlewis

comment created time in a month

PR opened ampproject/amphtml

🐛 Follow type changes from `layoutShift` to `layout-shift`.

The PerformanceObserver API has changed in the spec and Chromium, this commit follows those changes.

See:

  • https://github.com/WICG/layout-instability/commit/cada7215d5be4a4b83cac363a2980327dcbe6a86#diff-04c6e90faac2675aa89e2176d2eec7d8
  • https://chromium-review.googlesource.com/c/chromium/src/+/1685975
+19 -19

0 comment

2 changed files

pr created time in a month

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 23f27c333543a3574d6be959bbf400c1277f82c5

Follow type changes from `layoutShift` to `layout-shift`. See: - https://github.com/WICG/layout-instability/commit/cada7215d5be4a4b83cac363a2980327dcbe6a86#diff-04c6e90faac2675aa89e2176d2eec7d8 - https://chromium-review.googlesource.com/c/chromium/src/+/1685975

view details

push time in a month

create barnchericandrewlewis/amphtml

branch : follow-perf-observer-changes

created branch time in a month

push eventericandrewlewis/ericandrewlewis.github.io

Eric Andrew Lewis

commit sha 62746414bc95a98d8905900f47fc3a4b180354ee

update emoji mosaic

view details

push time in a month

push eventericandrewlewis/amphtml

Eric Lewis

commit sha ac1d09f084fa1ee5fc3c579df133e6e99535be0d

empty

view details

push time in 2 months

push eventericandrewlewis/amphtml

Eric Lewis

commit sha a6831d0bb317bd89852b0d0d3c40949f8c6244f9

PerformanceObserver is not defined in headless browser test environment

view details

push time in 2 months

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 0a21c6290c083ca13b8b33ba471df297e5ba0189

Fix stubbing of supportedEntryTypes property

view details

push time in 2 months

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 68b102375c1c7c1b38261b805148258b2bbe9f27

Add PerformanceObserver.supportedEntryTypes type def. This should be removed when the definition is released in closure-compiler.

view details

push time in 2 months

push eventericandrewlewis/amphtml

Eric Lewis

commit sha 559b54b4fbde51eb6a210eea020f76ffd4a8c883

Lint fixes

view details

push time in 2 months

PR opened ampproject/amphtml

✨ Introduce new tick event `cls` (Cumulative Layout Shift).

Fixes #23154

This introduces a bit of duplication with existing code for layout jank support. I've suggested we remove layout jank support in ~a month, see #23198.

+312 -3

0 comment

3 changed files

pr created time in 2 months

push eventericandrewlewis/amphtml

Eric Lewis

commit sha af1aebe16ae59cd53ad1b96793b848ed52f2d73f

Add CLS to tickevent docs

view details

push time in 2 months

create barnchericandrewlewis/amphtml

branch : 23154

created branch time in 2 months

issue openedampproject/amphtml

Retire layoutJank tick event reporting

We introduced support for viewers to read a new tick event lj (layout jank) in #21060. Layout jank will be retired in Chrome 76, being replaced by the cumulative layout shift metric, see #23154.

We can retire the layoutJank tick event, I would suggest a month or so after Chrome 76.

created time in 2 months

issue openedampproject/amphtml

Introduce new tick event cls (Cumulative Layout Shift)

Describe the new feature or change to an existing feature you'd like to see

We introduced support for viewers to read a new tick event lj (layout jank) in #21060. Layout jank was a new, experimental metric behind a Chrome Origin Trial. Since then, the metric has matured a bit. It is now a draft under the Web Platform Incubator Community group, has gone through renaming, along with some internal improvements.

I suggest we introduce cls as a new tick event, and make the metric data available to viewers along similar lifecycle events as we do for lj.

created time in 2 months

PR opened ampproject/amphtml

:bug: Send layout jank metrics more proactively.

This metric is now sent when the viewer visibility state changes to inactive, rather than just on document end of lifecycle.

Fixes #22781

+42 -0

0 comment

2 changed files

pr created time in 2 months

create barnchericandrewlewis/amphtml

branch : 22

created branch time in 2 months

create barnchericandrewlewis/amphtml

branch : 22781

created branch time in 2 months

issue openedampproject/amphtml

Improve reporting of layout jank reporting

What's the issue?

Layout jank is a performance metric which we started emitting to AMP viewers in https://github.com/ampproject/amphtml/pull/21060.

This implementation sends the layout jank metric on page exit, which we detect using the Page Lifecycle API.

We found a bug in our own implementation of the viewer, because the closing of communication with the viewer frame was disposed before the iframe itself was disposed. We fixed this bug, and in our post-mortem discussion considered that the AMP viewer is aware of its own definition of visibility state. We could have the viewer proactively report layout jank when the viewer goes into the inactive state.

created time in 2 months

more