unpoly.com

There have been some maintenance releases: 3.14.3 Revalidation of expired content will now preserve the scroll positions of any viewports...

When testing Ollama vision requests with VCR, the recorded cassettes will contain the full base64-encoded image payloads. A single...

I find it annoying to iterate on a spec that relies on a recorded VCR casette. You constantly have to...

Below is a strict, but still workable Content Security Policy for your Ruby on Rails project. Use this CSP if...

If you need to implement newsletter sending, rapidmail is a solid option. Support is very fast, friendly and helpful, and...

You may remember to use the || operator with caution to set defaults. We'll see that && and other conditionals come...

TypeScript basically uses structural typing, which is conceptually quite similar to duck typing, but with static compile-time type checking...

Event listeners are called in the order of their registration: button.addEventListener('click', () => console.log("I run first")) button.addEventListener('click', () => console.log("I...

The :test adapter doesn't respect limits_concurrency configuration. Switch to :solid_queue adapter in your test to verify blocking...

Short reference on how to quickly debug the vanilla Rails job adapters. Queue Adapters by Environment Environment Adapter

When you query the browser for DOM elements, there are some footguns you should know about. Some lists are synchronized...

When you replace parts of the DOM with new HTML, using .innerHTML = newHtml is usually the simplest and fastest option...

Compatibility: Angular 20+ with Jasmine 5.x and Karma 6.x As a default Angular CLI auto-generates test bootstrap...

unpoly.com

Quick reference for passing data from Rails to JavaScript via Unpoly compilers. Haml Attribute Syntax # Ising hash rockets and string...

unpoly.com

Quick guide for frequently used compiler selector patterns of Unpoly. 1. BEM Component Pattern When: Reusable UI components with multiple...

prettier calls itself an opinionated code formatter. I recommend using it for your JavaScript and TypeScript code. prettier only concerns...

developer.mozilla.org

navigator.sendBeacon is a way to reliably send a POST request, even on unload. Please note, however, that there are generally...

developer.mozilla.org

The linked MDN article is quite informative of a neat feature supported by all major browsers: Unicode character class escape...

Modern CSS offers the field-sizing property to allow elements to automatically adjust size (width and/or height) to fit their...

It can be hard to understand what causes a browser scroll smoothly or instantly. CSS, JavaScript and the browser settings...

Say you wrap your index view in a form to apply different filters like pagination or a search query. On...

DirectUpload allows you to upload files to your file storage without having to wait for the form to submit. It...

ActiveStorage does not provide any built-in way of implementing authentication for the available DirectUpload endpoint in Rails. When using...

For long running scripts it is useful to show a indicator for the progress in the terminal. Alternatively you can...