Page 7

I’ve been in a real sixties retro design mood lately (or, if you look at my fonts, maybe I always am at least a little bit). So Ducky Manly by Allmo Studio really hits the spot. It’s free for personal use and the commercial version comes as a duo. 

Download at dafont.

What’s up hot dog?

I’m a sucker for a sixties style font, especially one with skinny inner lines, so I’ve gotta recommend Hot Dog by Toko Laris Djaja. It’s free for personal use only. 

Download at dafont.

Font Banner - Free Fonts
Advertisement
Font Banner - Free Fonts
Advertisement

Optimizing Lodash imports with jscodeshift

Avoid enormous network payloads!

Since the beginning of the year, I’ve spent a lot of time at work getting ready for Google Core Web Vitals-ageddon. Most of the techniques we’ve tried are fairly well-documented and I don’t want to retread the great advice and tutorials that are already out there (although I should put together a roundup of links). A few have required a little more investigation and experimentation, though, and those seemed worth writing up.

Remove unused JavaScript! Avoid enormous network payloads!

One easy trick for creating huge JavaScript bundles and making Google angry is importing the entire Lodash library when you only use a few methods. A lot has been written on Lodash and bundle sizes and best practices for imports (I’m partial to The Correct Way to Import Lodash Libraries - A Benchmark on BlazeMeter) but what I found lacking were tips on how to update an older, monolithic Rails app with inconsistent import patterns and the continual risk of unmanageable merge conflicts.

Enter jscodeshift.

jscodeshift is a toolkit that allows you to run codemods over JavaScript files and it was a lifesaver in this situation. According to the article above, direct imports are the way to go and jscodeshift makes it possible to instantly transform any files:

  • Importing the full library (import _ from 'lodash')
  • Importing methods from Lodash with curly brackets (import { name } from 'lodash')
  • Calling methods starting with _.
To get started with jscodeshift, run npm install -g jscodeshift to install it globally and follow along below.

Continue Reading

React Inner Image Zoom v2.0.0

Well. Apparently way back in July when I published react-inner-image-zoom v1.1.1, I announced it with a long intro about trying to get motivated during the lockdown and my hope that it would kick off a glorious new age of productivity.

That didn’t actually happen, but I’m sure it will now that we’re a year into lockdown and I actually finished v2.0.0 after putting it off for months.

So what do you need to know about the new version? It:

  • Refactors the code using React hooks so you’ll need React v16.8.0 or above to upgrade.
  • Renames the startsActive prop to zoomPreload.
  • Adds hideCloseButton and hideHint props to hide those elements. If the close button is hidden, zoom out will be triggered by tap on mobile.
  • Adds width, height, and hasSpacer props to make Lighthouse happy. The width and height will be added as attributes on the original image. If hasSpacer is true, those values will be used to get the original image’s aspect ratio and add a loading spacer to prevent cumulative layout shift.
If you find any bugs, be sure to submit an issue on Github.

Back to my very sporadic “monthly” font highlights. 

I’m really loving Together of Love by goodigital. It’s a really playful, hand drawn font with fun inner shapes and shading. Free for personal use only.

Download at 1001 Fonts.