Ian Evanoff

Chicago, IL

Site update: Dep updates, date formatting & bye, preact 👋

Happy to report I have actually been working on my site over the past few weeks, in addition to writing real blog posts of substance.
Just thought I’d jot some notes down on what I’ve done so far, in case it’s useful to anyone, including Future Me:
  • I updated allll the deps. Nobelium upstream updated its own deps a scant 4 months ago, and yet so much was still out of date, which just goes to show how quickly the JS & React ecosystems move. I jumped up to React 18.
  • When I did this, however, I found my site broken on deploy. That’s how I learned Nobelium is one of several NextJS projects that swaps in preact for React in Production only. I don’t mean to shade the authors of the lib… but I’m an Old™️ who has had a lot of Prod only bugs I didn’t intend for; the idea of using a completely different library with completely different authors and a reasonably different API (especially in the case of React 18) in Prod only gives me the wig. So, I killed that config and pulled preact from my deps. Premature optimization, etc etc.
  • I also updated react-notion-x, the base Notion renderer, which was two major versions ahead and had completely restructured its component folder structure and import properties on the NotionRenderer. Initially I got some warnings about importing empty components that I had to track down, but I think I’m good now.
  • Nobelium came with a lightweight locale loader and a simple date format function, which is cool and thoughtful! But let’s face it: I am never ever going to maintain the other locales—I’m thrilled I’m writing blog posts in English, let alone other languages—so I pulled those. The date formatter was funking up my timezone, so I grabbed date-fns and did a little refactoring to get something I liked. It feels good to leave the dinosaur that is MomentJS behind, but still have a thin barrier between me and the native JS Date object.
  • Lastly, I did a few a11y touchups: removing all but one <main> element, adding aria-hidden as needed, making sure links and clickable elements had some sort of descriptor text, etc.
Description: yarn upgrade-interactive at the command line saying “No upgrades found.” Truly an amazing feeling.
Description: yarn upgrade-interactive at the command line saying “No upgrades found.” Truly an amazing feeling.
I didn’t want to get in my own way and prevent working on my own site, so I didn’t structure this work in the form of a PR that could be contributed upstream, but I may do so later this year if I have time.
Next up is, hopefully, some actual design work! 🤞
 
 

© ian evanoff 2024