GoogleChrome / web-vitals-extension

A Chrome extension to measure essential metrics for a healthy site
https://chrome.google.com/webstore/detail/web-vitals/ahfhijdlegdabablpippeagghigmibma?hl=en
Apache License 2.0
2.35k stars 105 forks source link

Popup redesign with field data #82

Closed rviscomi closed 3 years ago

rviscomi commented 3 years ago

Fixes #53

https://user-images.githubusercontent.com/1120896/102698818-3de00900-420e-11eb-9b12-08590199d007.mov

Screenshots

Page-level data ![image](https://user-images.githubusercontent.com/1120896/102700333-7980d000-421a-11eb-9ddb-e728ee587569.png)
Origin-level data ![image](https://user-images.githubusercontent.com/1120896/102700357-a92fd800-421a-11eb-9ecf-fe6e451b88c3.png)
Hovercard ![image](https://user-images.githubusercontent.com/1120896/102704457-9f719900-4249-11eb-80a8-57e5879c100a.png)
Local data only ![image](https://user-images.githubusercontent.com/1120896/102700379-d8dee000-421a-11eb-9630-5b31066f2398.png)
No local data ![image](https://user-images.githubusercontent.com/1120896/102700344-8e5d6380-421a-11eb-99d3-caf98ce2c613.png)
rviscomi commented 3 years ago

This is ready for review but we should figure out a solution to https://github.com/GoogleChrome/web-vitals-extension/pull/82#discussion_r546263102 before merging.

Remaining TODOs on my end:

image

addyosmani commented 3 years ago

After installing the implementation from this PR and pinning it (post creating the secrets file with the API key):

I navigated to The Verge. It shows local metrics only and highlights that field data is unavailable.

image

Debug errors from about:extensions: image

We know of course that the Verge does have field data available:

image

The same appears when I try to navigate to the BBC:

image

I verified this in both stable and Canary.

I haven't had a chance to debug this further just yet, but will take a look at what else may be causing it. From the stack traces, it looks like data is failing to be fetched at all from CrUX.

addyosmani commented 3 years ago

@rviscomi In terms of next steps, how would you feel about us doing an internal Fish Food of the new version of the extension to get feedback before moving forward with the current UX?

rviscomi commented 3 years ago

SGTM

rviscomi commented 3 years ago

Updated the branch to include an option for users to use phone field data. The device used for field data (desktop or phone) is now indicated in the UI in a few places:

image image

The option can be toggled by right clicking on the extension icon in the toolbar, selection "Options", and (un)checking the "Compare local experiences to phone field data" field.

image