Not the most productive of weeks. Quite a bit of sickness in the family, so I took it a bit slower. But I've added very rudimentary todo adding and completion.
I'm still figuring out HTMX. I like it, but it hasn't 100% clicked with me yet. Part of the issue is keeping my backend clean. It seems like you can end up with a lot of small endpoints. Naming those and organizing them in files is a challenge for me. But I'm experimenting and figuring things out as I go.
HTMX feels super snappy on my local machine, but I know it will feel slower when it's actually deployed. For example, to complete a todo, you click on a button, which makes a request to change the status of the todo, and the new HTML is returned. Without any loading indication, this feels clunky on a slow network. A loading spinner or something does not feel the most elegant. I can potentially fix this with optimistic updates with AlpineJS or something. I worry that if I put in the work to introduce optimistic updates, I'll have reinvented a JS framework and should've just used one from the start.
One thing I'm pretty proud of is my collapsible sidebar implementation. I use AlpineJS to update the state of the sidebar. Using the persist
plugin and a custom cookie storage. That state is saved in a cookie so I can use it on my server to make sure the sidebar is rendered with the correct classes. This prevents any flashes of it opening or closing on refresh or navigation. Pretty nifty.
I'm still excited about this project, and am enjoying learning more about HTMX. But part of me is wondering if I should just use SvelteKit or something so I can move even faster. The paradigms would be more familiar to me.