Closed davidsneighbour closed 2 years ago
Adding to this:
First Input Delay (FID)
value is only displayed when the first interaction with the page is done (even if it's just some milliseconds). Would sending a click event every x seconds help update that autonomously or would it somehow slow down the page?@davidsneighbour Hmm... what's completed
? Are the two issues you filed not a problem anymore?
I saw this web component a while ago and always wanted to include it in one of my projects. Did it today and stumbled over some issues or things I would do differently or things I did not find documented anywhere. The following is a list, please don't treat it as an issue, just some notes that might help you improve the project.
the setup
ideas, suggestions
display: inline
CSS on many elements (see the sass styles). I think that might be the case for other style systems too. Maybe additional options of what tags are used to render labels and values might help, maybe even add a template setting? Might be overkill.is-final
andis-good
as classes on the values of the vitals. Sometimes I see three dots when a vital is not calculated and it does not seem that a class is added in those cases. I would expect the system to have some form of traffic light system... yellow for "we are on it", red for "that is bad" and green for "good". Could you either document the classes applied while running/when done or implement some form of system? To me it appears that is-final and is-good are the only classes applied. something along the lines ofis-in-progress
would be nice. I thought that there might be anis-bad
but I didn't come across one of these on my site yet. So... either a better documentation or some new features :)is-good
class. I feel like that should be at least documented and maybe even configurable.npm install web-vitals-element
andimport 'web-vitals-element';
as installation methods. I am using ESBuild (in GoHugo) to build my JS and this is much better than a script tag somewhere on my page.long story short
I like to gloat and this component helps immensely, thank you :)