Git Product home page Git Product logo

devtools-timeline-images's Introduction

Hi there ๐Ÿ‘‹

Emoji avatar of me with pew pew words

As a seasoned professional with over a decade of experience, I am a diverse full-stack web developer from Serbia. My passion for web technologies, optimization, and workflow innovations has been a driving force in my career. Since 2011, I've made a significant impact on the web, leading teams, implementing efficient hiring processes, and spearheading product development.

My continuous integration of new technologies for task automation and project optimization reflects my unwavering commitment to staying at the forefront of the ever-evolving web landscape.

Topics I am passionate about:

  • Web performance, CWV, LCP, INP, images.
  • Browser engines, V8 mostly, AST, TurboFan.
  • Documentation, I actually like to read and write them ๐Ÿคฏ
  • Managing teams, 1-1, PDP, 360 review.
  • Security, XSS, SQLi, RCE.

Other Facts

  • ๐Ÿ“ฐ I love to write, but can't find enough time. CSS-Tricks
  • ๐Ÿ“ซ How to reach me: @markoilic96
  • โšก Fun fact: IPSC member and finance lover

Stack

Trying to stay agnostic, love vanilla JS. If I have to use a framework, Vue or Svelte will be my choice.

devtools-timeline-images's People

Contributors

dependabot[bot] avatar ilicmarko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

brydzu

devtools-timeline-images's Issues

Generate a video

This is why I made this module and that is to generate a video of a timeline. There should be an option to choose outputs, video or sequence of images.

Wrong file type

I never check which file type the stream is. This can go wrong as the images produces from Chrome is different file types based on OS (I think). Therefore when saving in the wrong format all images are going to be corrupt.

Possible fix is check the stream header for file signature (magic numbers).

shorter name for command?

Not an issue per se, but how about a shorter command name or at least an alias to a shorter command ? Perhaps an acronym of the package name dti? If a user's terminal has autocomplete then it wouldn't really be a problem, but it's just an idea.

.idea packed into npm package

.idea folder is included in your npm package. Ideally the package should be as light as possible, and in this case only include the necessary files like index.js, readme, license, and package.json.

Fix is to add a fields key to package.json with the files you want to include in the package. license, readme, and package.json are included by default.

"files": ["index.js"]

Extracting additional data from JSON

Currently I extract only the snapshots from the JSON. If you look inside the JSON it turns out to be a GOAL mine of data (thank you Chrome Dev Team).

The idea is to extract interesting data that can be related to the screenshots and append it to the image with something like JIMP (or something more lightweight).

Timings

Chrome uses Navigation Timing, specifically PerformanceTiming interface to "tag" (name) the events.

{
  "pid":13925,
  "tid":1,
  "ts":44982508648,
  "ph":"R",
  "cat":"blink.user_timing,rail",
  "name":"domInteractive",
  "args":{
    "frame":"1D2BC421FEFCB3E4C52583A0BC6CD5DC"
  },
  "tts":158644413
}

As far as I can see all timing events have the same categories blink.user_timing,rail. From my understanding it means it is user_timing and more importantly it is a rail, meaning it will be displayed on its rail (please not this is all my guess):

rail

All in all, the idea is to append Timing events to the screenshots and shot the event. Furthermore a simple "semaphore" (hold your horses it's not concurrency) like this:

image

Time (Counter)

This has nothing to do with the previous section Timings.
To put it simple append a simple timer in seconds on each screenshot. Same as the Webpagetest.

timer


Resources

Maybe consult Paul or Kayce.

Remove input argument

I find -i (--input) redundant and maybe even annoying. Input is always a requirement, therefore it shouldn't be an explicit argument. It should be removed, making the call more natural.

Old way:

devtools-timeline-images -i timeline.json -o images

New way:

devtools-timeline-images timeline.json -o images

Add tests

Cover the whole project with tests. Initially project was started on a deadline, so I skipped TDD.

Tests should cover all commands and possible input/outputs for them. Also maybe introduce a CLI framework that can help with the structure and test organization.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.