Weekly Report: 1st July 2019
Weekly Report is going to be a new series of blog posts giving an update of what I did in the current week. The aim is to share what I've done and also to help me appreciate and compare my acheivements.
While there will be FrontierNav-related updates in this series. They'll also contain unrelated updates related to my other projects. If you just want FrontierNav updates, you can wait for the monthly FrontierNav Progress Reports.
- Added keyboard shortcuts to the universal search.
- CTRL+SHIFT+F opens the search dialog.
- ESC closes the search dialog.
- Added a context menu (right-click) to the editor to edit and remove entities.
- Removed a lot of excessive animations.
Animations are Overrated
I used to think animations helped a lot with user experience. It let users know where things are coming from. But I've realised now that it also slows down the user experience. For new users, it may help to know what's happening, but once they know how to use an application, the transitions just introduces input lag.
So I've removed most transitions and animations in FrontierNav and everything just feels a lot snappier. There are some issues with things popping into view as they're asynchronously loaded, but that can be solved by using placeholders to avoid page reflows.
I upgraded FrontierNav's dependencies which broke the Webpack build. After reverting, the build was still broken. It turns out, after the revert, the build wasn't broken, the unit tests were.
It seems somewhere down the line, the unit tests worked, Jest cached the build, Babel updated, broke the test build, but since Jest cached the previous working build, it continued to work. When I upgraded, the caches were cleared and the broken build started showing up along with the new broken Webpack build.
Anyway, I "fixed" it by downgrading Babel's TypeScript plugin. I'm not 100% sure what the cause is but there's some related tickets in Babel's GitHub so I'll leave it on hold for now.
I kind of regret moving the TypeScript build over to Babel now. If more issues keep propping up, I'll move back to using the TypeScript Compiler.
FrontierNav uses Firebase for storing dynamic data like user profiles. To authorise different users to write to the database, Firebase has Security Rules written using a custom API inside JSON strings. This is of course horrible, so I looked into something safer that can build the JSON.
There's a few solutions, but nothing's really maintained and it'd be a risk to use them. Since it's not that difficult (essentially concatenating strings), I made my own API: firebase-rules.
It was a fun exercise into learning more of TypeScript's type system and making an API that keeps within the rules of Firebase's existing one while also providing some type safety and reusability.
My PC's Linux environment had some issues. It's been pretty stable since I first set it up a year ago, but I made the mistake of trying something out.
I tried to install Cinnamon to see if it's any better than Xfce. It wasn't. I switched back to Xfce and then noticed my Lock Screen switches to the wrong resolution. After a ton of Googling, I concluded the Nvidia drivers or configuration was messed up somehow and switched to using Nouveau drivers.
Nouveau drivers have their own set of issues, which is why I initially avoided them, but right now it's better than having messed up screen resolutions.
I'll probably use this oppurtunity to switch to Xubuntu. And in the future, I'll buy an AMD graphics card since Nvidia seems to have a bad history with Linux support.
Thanks for reading.