• Added the 10 most recent webmentions to my site on the homepage. I think it gives it a bit more sense of liveliness...similar to how we used to show the latest comments back in the day...
  • The 300th PR for Tanzawa is a good one. It fixes a long-standing issue with how plugins worked over 20 small commits. +76 / -274. It's a bit late for me to merge and deploy it, but I think it unblocks development for me.
  • I added a graph of the last 10 weigh-ins in Tanzawa health.
  • First PR to Tanzawa in 3 months merged. I upgraded to Django 4.2. Had to include a small hack due to incompatibilities between Spatalite and sqlite3☹️. But at least now it unblocks further development πŸŽ‰
  • Since releasing the new top page on my site, I didn't like how my photos, which mostly come from me checking in somewhere, were hidden unless you were subscribed to my blog.

    To fix this, I added a small image gallery like I used to have on my old blog years ago in college. It just shows the last 10 photos on my site. Might be fun to have a "randomize" button you could click to view more / different photos...

    A small gallery of my most recent photos
  • I thought mapping using htmx would have been more difficult than it was, but it was dead easy. As such, Tanzawa Exercise can now display the route of your activity. An example from a run this past summer.
  • Tanzawa Strava Integration Merged

    Just in time for the new years resolutions (and the last possible moment for me to hit one of my own 2022 goals), Tanzawa integrates with Strava via a new Exercise plugin. This initial release is the absolute minimal viable integration.

    This is what the admin screen looks like:
    It works like you'd imagine: click the Import from Strava button to import your latest activities. While it's storing the mapping data, it's not displaying them yet.

    There's also a public page that's added to display some stats of your running. It looks like this:

    Again, quite minimal. I even wrote some documentation for how to enable and set it up.

    Both of these pages will be evolving a lot over the coming weeks as I now have a foundation in Tanzawa for working with Strava data in place. On the admin site, I'm planning to add mapping and more detailed information. On the public side, I'm planning more statistics and comparisons, including some fun ones that'll help us track really big goals.

    If there's anything you think is a must have or some fun ideas that one could do with the data, I'd love to hear them!
  • Editing Bookmark / Reply Titles with HTMX

    This post is a followup to Allow editing of replies/titles and describes some of the changes made to enable this functionality (#265) and my thoughts after my first steps with HTMX.

    Unable to change bookmark / reply titles ☹️

    Above is the before state, which is a static view of title/url of a bookmark/reply. Below is aΒ  gif of what I built and the finished state. There's a new change button, which you can click to reveal a form that allows you to edit the record. This form allows you to save or cancel. Save updates the record and changes the screen back to the "read only" view, while cancel just loads the current "read only" view. Zero custom Javascript.

    Editing a bookmark url / title in Tanzawa

    Powering this is two new simple views in the admin site. One loads the entry's bookmark/reply and returns the read only view. The other loads the same record and displays a form on get, updates it on post.

    The htmx and these two small views were the simple part of this feature. The heavier lift was decoupling the Tanzawa micropub endpoint from the admin views/forms, and then updating the admin views to no longer expect IndieWeb extension data (reply/bookmark url/titles etc...) on update (it's still required on create).

    Thankfully I had functional tests for my micropub endpoint, so I could be confident that my refactoring didn't break existing functionality. Those tests allowed me to extract the logic from the admin forms and put them into a application function. This new application functions are reused by all interfaces creating/updating entries.

    The next phase was adding tests to the admin views and then updating them to use the common application functions. This work was mostly a slog because I needed to add tests and better factories for my tests before doing the actual refactor. There's still more improvement that can be made in the test factories to make them a bit more DRY, but they're good enough for now.

    Working with HTMX has been a dream. Rather than usingΒ  Javascript to tweak DOM, I can simply make calls to the backend to get html from the backend by adding just a couple of attributes to my template dom. All of this using the same django templates.

    My next steps with HTMX are going to be to look into integrating django-components, so I can wrap up the Javascript I do need with the their templates/css and do some more refactoring. For example, right now reply/bookmarks have effectively the same templates / views duplicated. Using components, I should be able to have a single logical component to power both.

    If the components strategy works, I will look at breaking out various parts of Tanzawa into htmx/django-components for easier maintenance e.g. the location selector or location view on the bottom of checkins.
  • Response to Edit reply bookmark titles by jamesvandyne Β· Pull Request #265 Β· jamesvandyne/tanzawa

    This PR started as an experiment with HTMX to allow Tanzawa to edit reply/bookmark titles. As all of the entry creation forms/views are inherited from similar base-classes for easy/speed of initial...
    I've re-worked all of the create/update views for each post type to use application functions and added functional tests. Editing the url/title for reply posts, works really well. HTMX is allowing me to create the simple interactions I want without Javascript.

    The biggest change is reply data is no longer updated all at once with the rest of the post, but rather when you finish editing the title/url, similar to how editing a GitHub PR title works.

    The last bit that I think needs some more work, unrelated to the rest main objective of his issue, is the first step when creating a reply where I request the URL to, and it uses Turbo to fetch the meta-data / return a page that can create a reply.

    This flow may need a bit more yak shaving so it doesn't use Turbo at all. Will give it a fiddle to see if I can refactor and simplify the flow using HTMX.
  • Response to Allow editing of bookmark/reply titles

    Tanzawa is a blogging system designed for the IndieWeb that focuses on sustainability. - Issues Β· jamesvandyne/tanzawa
    Problem
    It's currently not possible to edit the title of bookmarks / replies without using the Django admin. This is an issue because sometimes the title contains meta information that you wouldn't want to appear in a comment / blog post.

    An example title when posting a new issue from Tanzawa


    This is especially true as I try to experiment with creating Tanzawa issues on my blog and backfeeding all comments, with the goal of effectively keeping the "lab notebook" of the GitHub issues to also be on my website.

    Success
    There is an edit button that, when clicked, allows you to edit the the title.

    Implementation Details
    This should be implemented using htmx and act as the first page to allow us to remove turbo from Tanzawa.