Andrew Timberlake Andrew Timberlake

Hi, I’m Andrew, a programmer and entrepreneur from South Africa,
building Mailcast for taking control of your email.
Thanks for visiting and reading.


Use a view model with Phoenix LiveView

How to use a view model to decorate records with UI state in Phoenix LiveView.

14 Feb 2025

Improve your LiveView testing with test specific attributes

Instead of coupling your tests to the HTML structure of your LiveView, use test specific attributes to make your tests more robust. Test specific attributes can be removed to keep your production HTML clean.

30 Jan 2025

Set a flash message from a LiveComponent

How to use put_flash/3 in a LiveComponent without navigation.

21 Jan 2025

Render heex templates directly from a Phoenix controller

Sometimes a controller and a view and a template is just too much. Here's a way to embed heex templates within your Phoenix controllers.

07 Oct 2024

How to use the datetime-local input type with timezone in a Phoenix LiveView

How to get a users timezone when using the datetime-local input type in a Phoenix LiveView.

21 Aug 2024

How to respond to channel broadcasts in a Phoenix LiveView app layout (global broadcasts)

How do you respond to channel broadcasts in a Phoenix LiveView app layout? You need a way to subscribe across all LiveViews.

17 Jul 2024

How to update URL params in a Phoenix LiveView

How do you push an update to a single query string param without changing other params in the url or even being aware of the url or its query string. I’ll explain how to build a filter toggle component and tag list component that maintain state in the query string while updating state in the LiveView.

07 Jun 2024

Use Font Awesome icons in Phoenix

Phoenix comes with Heroicons built-in. If you want to change to using another icon library, like Fontawesome, it can be done quite easily with a few small changes. This post will show you the steps needed so the <.icon /> component works with Fontawesome.

12 Feb 2024

Add a tooltip component to Phoenix

How to add a tooltip component to your Phoenix app using PopperJS. Learn how to connect client-side javascript when elements are added and removed from the DOM.

12 Sep 2023

How to use SASS/SCSS with Webpack in Phoenix 1.4

How to change the Webpack configuration in Phoenix 1.4 from CSS to using SASS/SCSS

17 Jun 2018

Next page