Weeknote 36: Cool mint green

Weather update: ohhhh yes gimme that sweet sweet overcast. I'm very grateful that it's cooled down, although it looks like it's gonna be back up to big heat late next week. I think that's ok, especially of a weekend when I can appreciate it more. For now though I'm enjoying the mild weather. Me and the wife popped out for breakfast earlier and enjoyed a little smattering of rain on the way back.

I would describe myself this week as sluggish. My sleep wasn't fantastic. It sounds like this has been the case for my team as well. That along with the slightly high-concept work I was doing meant I felt like I didn't get very much done. Not super rational but it's how I'm feeling. I hope I can get rested this weekend.

So what did I actually do this week?

  • Investigated extending our filesize metrics workflow to try to include percentage changes from pull requests. These are the PR comments that we auto-generate on our PRs that show file sizes of our bundled modules. Without percentage changes, those comments aren't very useful at a glance. I've got a pretty good idea of how to structure a solution to make those comments more useful and more lean.
  • Updated our visual regression tests to only scope the screenshot to the query selector that contains the thing we're screenshotting, meaning we're not gonna get odd review app stuff showing up in screenshots that we need to clean up manually.
  • Helped with an initial audit of the things we're screenshotting as part of our VRT setup and a chat about the methodology of what bits of GOV.UK Frontend we screenshot.
  • Started auditing our component examples both for our review app and our VRT
  • Nosed in on a discussion about our operations for releases and release notes

Examples on top of examples

This cycle I'm involved in trying to make little improvements to our technical tooling, principally our visual regression testing setup and our review app, for which there's a degree of overlap. We use Percy for VRTing, if you're interested.

I mentioned earlier that this work was kinda high concept and that's because auditing our screenshots is trickier than it initially seems. Currently we take screenshots of our 'default' components, so just the flat component nunjucks macro call with only required params, the same thing with and without js turned on if the component includes js, and a few other specific variations where we feel it's necessary like small variants of checkboxes. An audit is theoretically going over these examples and seeing what we could add and/or remove.

What makes this tricky is firstly that it's difficult to recall how our entire component library works to form a list of changes. Secondly, we have a budget. We could in theory screenshot everything but we're paying for Percy and we're not made of money. We do need to keep things lean if we can. This makes it hard to determine how we maximise component behaviour representation without risking losing regressions between specific feature interactions.

What this work ended up becoming was a combination of auditing all examples in our review app and then from there, picking the examples that are most useful to track in VRTs. Our review app by the way is a small express app which is attached to the GOV.UK Frontend codebase. It acts as a space for prototyping and development of components and component features and is used as part of GOV.UK Frontend's automated test suite.

I would describe example auditing so far as a varied experience. Components vary a lot in API complexity, which it turns out leads to it being much harder to organise examples for certain components, which makes example auditing a real slog. It's an endurance challenge and was an endurance challenge getting to that point where we understood what we wanted to do but it's still worthwhile custodial work. I'm looking forward to a slightly cleaner review app once we're finished.

Mini website changelog

One other thing I did between work was change the provider for this website from Netlify to Cloudflare Pages. I've got a lot of love for Netlify but what prompted the change was Cloudflare's use of renewable energy and very nice anti-AI scraping policies, which I've turned on for this website.

This is backed up by a scan from Website Carbon giving this website a glowing rating. Before the move I had a big sad red marker that said that whilst the website was really good, it was being served with bog standard energy. Now I'm a cool mint green across the board.

I'm aware of Cloudflare's extremely shaky history with 'free speech' and this change wasn't made on a whim. In spite of this I still reckon they're the best alternative to Netlify right now. I can always move again if I find something better. Feel free to tell me if there are some good ones that I missed.

I'd like to do more principle type stuff. I've been toying with the idea of moving off of github so my code doesn't contribute towards copilot scraping. All stuff to think about down the line.

Owen's fitness and viddy games corner

I went for a run yesterday and now my leggies hurt. I've been enjoying a more simple fitness routine of running and weights. I went a bit bonkers in fact and bought a Polar OH1 for heartrate monitoring. Why? For the stats! I've used it a couple of times now and it's at the very least interesting to see the chart. Although Polar's app setup is dogshit. Why are there two apps? Why does Polar Flow seem to be the more feature rich one but is constantly dropping connection with the monitor? I've got some thoughts about hooking it up to a sleep monitoring app for even more stats.

I've been working my way through my steam sale haul. So far I've finished How Fish is Made which is a very strange (non-derogatory) arty game about the nature of choice. I'm currently playing through Arctic Eggs which is also strange and arty but also wrapped up in a fun cooking game. I didn't think I'd enjoy managing flipping an egg whilst not burning a link of sausages whilst popping open a sardine tin whilst not letting a cigarette burn out, but I do!