Jack Sleight

Jack Sleight

@jacksleight.com

Freelance full-stack, Laravel and Statamic developer. Love solving interesting problems. jacksleight.dev

143 followers197 following56 posts

Naming things is hard. Sometimes fun. A few class names from the current website rebuild: potato, argyle, snuggly, cushion, baking, gloomy, prick.

After much procrastination and putting it on the back-burner I’m finally getting close to finishing my new website (only taken two years). This will also include a bunch of new artwork/icons for my @statamic.com addons.

Jack Sleight reposted

Statamic 6 is here! 🚀 A redesigned Control Panel, a modern Vue 3 + Inertia foundation, a new UI component library, a long list of architectural & performance improvements, and that's just scratching the surface. This is a new beginning, ready for what comes next. ❤️

Computed Livewire properties aren't available client-side, but sometimes they'd be really useful. So I built a little utility to make that possible. Under the hood this is just dispatching an event with the data on each update. You can of course do that yourself, but I like the simplicity of this.

Unified component experiment continues. Blade components now use an inline class for props, so the syntax can be identical to Livewire. Now upgrading a Blade component to Livewire is as simple as switching “BladeComponent” for “LivewireComponent” and adding the Livewire things.

Working on some new features for Bard Texstyle 3.5. First one is the ability to hide parts of text content, useful if you need to temporarily remove something. Hidden content is completely excluded from the rendered HTML.

Happy Friday! I’ve been chipping away at an approach to writing Blade and Livewire components that smooths out the differences between the two, letting you write and use everything the same way, and also include scripts and styles that get bundled by Vite. 1/3

View full thread

And because Livewire synthesizers are awesome you can wire:model attribute bag values. Not sure about the use cases for this (and the bag is locked by default), but it's still cool. 4/3

Happy Friday! I’ve been chipping away at an approach to writing Blade and Livewire components that smooths out the differences between the two, letting you write and use everything the same way, and also include scripts and styles that get bundled by Vite. 1/3

* Every view is a Blade or Blade+Livewire (via Volt) component * Non-Livewire components can be used as full pages * Livewire components get an attribute bag and can have slots * Layouts are included in exactly the same way in both types * Scripts and styles can use imports/tailwind helpers etc 2/3

If you don’t need Livewire just drop the `<?php` chunk and it’s a regular Blade component. If it’s full page just wrap the template in your layout. And the best thing is this only requires some very minimal hooks into to the blade compiler, a couple of helpers, and a Vite plugin. 3/3

Slightly thrown by Tailwind 4 referring to JS based plugins as “legacy”. The new CSS based config is awesome, but anything requiring logic or using helpers like `flattenColorPalette` still needs to be JS based. Hope they don’t disappear one day.

Stumbled on a little CSS tip. If you need an absolute value you could use `abs`, but it’s limited availability right now. However `hypot` is newly available and: > If a single parameter is provided, the result is the absolute value of its input. Or you can just use `max`, but it's more verbose.

This is the syntax (stripped down), the buttons in the video just toggle the angle and base classes. Actual implementation is pretty simple since CSS handles (almost) all of the trig.

You are up to date.