Activity

Rowan

Shipped this project!

Hours: 7.28
Cookies: 🍪 139
Multiplier: 19.12 cookies/hr

This was super cool to build, learning the cloudflare API was a blast, and data is beautiful :)

Rowan

Completely forgot to do devlogs lol :loll:

But anyway, the main things I wanted to cover are that I started out by exploring the GraphQL API, as this was my first experience with it. I was starting with just trying to scrape the actual dashboard until I realized that CloudFlare actually has a dedicated API endpoint for it lol.

Attachment
0
Rowan

Big updates for Hackatime today!

  1. You can now sort by dates on the dashboard, so if you only want stats for the past week, now you can!
  2. The cool charts and graphs have gotten a facelift! They should look much better now as they feel a bit more uniform with the rest of the app :D
  3. New script to derive fake users for devs to locally test the platform with “real” users and data
  4. General bug fixes of random strange things :3
Attachment
0
Rowan

Smaller devlog since there were not that many big changes, but the biggest thing was I fixed up our Swagger API docs to be fully compliant! Swagger has this little validation tool (see https://validator.swagger.io/) which can help you make sure you follow their standards, and I am proud to say that Hackatime now follows it! We have a nice little green badge to show for it :D

I also fixed a tiny bug with a admin API endpoint, hind sight 20/20 since it was coded by someone else lol

Attachment
0
Rowan

Shipped this project!

Hours: 21.98
Cookies: 🍪 301
Multiplier: 13.69 cookies/hr

This is a snippet of all the fun changes, but the biggest one is faster loading thanks to async requests on many pages, and tons of quality of life patches and bug fixes behind the scenes.

Rowan

More fun hackatime features!!

API Docs

Thanks to Deployer, we finally have semi-functioning API docs for Hackatime with Swagger! It includes every endpoint, even some that most nerds don’t really need. Regardless, it is there, enjoy.

Skeleton loaders for projects page

I have been wanting to do this for a little while, but I came up with a interesting solution with it! Most normal skeleton loaders are over content that is predictable, eg it knows how much space to fill and what not. However, that is not the same with the projects page! Some people can have 10, others 25, others 100! How do we make that experience nice for them? I thought that if we precompute how many project cards to render, and then fire off the query for what to render in those boxes, that could help! Turns out, figuring out how many project cards to render is a really fast query! This helps with user experience by making the app feel just a little bit more smooth

Tiny security issue with allow_public_stats_lookup

In the settings, you can opt out of the public API. Most staff members do this to hide HQ projects. However, while reviewing changes to the API docs, I found that the validation on that endpoint could be bypassed if you left out a query parameter, which has since been fixed.

Other tiny things

I did a massive reformat of some of the code. Most of this is just indenting changes. This does lead me to think that inline JS in ERB files is a bit cursed, and we should consider splitting them into separate files. I will have to do more research to see if this is really a good change or not. Thanks for reading this rather long post :3

Attachment
Attachment
0
Rowan

Added skeleton loaders across the app. This includes user profiles, home pages, and leaderboards! This helps make Hackatime feel a lot smoother!

There are some other small changes which includes

  • Spinners on sign buttons (like when you click sign in with Hack Club account)
  • Allow users to change country
  • Fix CSS bugs with the modal on user exports
  • Fix a whole bunch of linting issues and small bugs
  • Fix a bunch of N+1 issues on endpoints
Attachment
Attachment
0