Notes
by Matt Stubbs
This is how we make slides at Apple
09 December 2024
A few good tips from a form product marketer at Apple, including:
font size < 30 are forbidden on a deck.
and
Animations need to serve a narrative purpose.
from Register Spill
import_if_available/1 in iex
07 November 2024
IEx provides import_if_available/2
to import a module only if it exists.
So in my .iex.exs:
import_if_available(Ecto.Query)
and there's no error if Ecto.Query doesn't exist.
How to upgrade Heroicons in an existing Phoenix app
29 October 2024
Heroicons are a set of SVG icons stored in assets/vendor/heroicons
. They are setup when you run mix phx.new
along with
a handy UPGRADE.MD
file that explains the simple upgrade process:
export HERO_VSN="2.0.16" ; \
curl -L "https://github.com/tailwindlabs/heroicons/archive/refs/tags/v${HERO_VSN}.tar.gz" | \
Replace the 2.0.16
with the latest version on Heroicons and that should do it.
My project was created before the ‘micro’ size class of icons was created so I needed to add them to tailwind.config.js
plugin(function ({ matchComponents, theme }) {
let iconsDir = path.join(__dirname, "./vendor/heroicons/optimized");
let values = {};
let icons = [
["", "/24/outline"],
["-solid", "/24/solid"],
["-mini", "/20/solid"],
["-micro", "/16/solid"], // Added this line
];