Hi, I'm Matthias

I am a founding partner of Feinheit AG and Die Bruchpiloten AG. Find me on GitHub, Mastodon, Bluesky, LinkedIn or by email.

2021-03-14

Weeknotes (2021 week 10)

I’m trying out the weeknotes format to hopefully write a bit more 😄.

feincms3: Page types and moving torwards a 1.0 release

The current beta release of feincms3 (0.90b*) introduces support for page types. This new concept unifies templates and apps. Since feincms3 apps can basically do what they want it didn’t make much sense to force managers to choose a template when they already selected an app. Sometimes, we offered managers a “projects” template and a “projects” app and they had to select both. This duplication was hard to explain and justify.

This isn’t the only backwards-incompatible change in 0.90b*. The default image plugins now always have a caption and an alternative text field; the versatileimagefield-based plugin is gone as are the shims in feincms3.apps.

The idea is to release a 1.0 of feincms3 soon-ish. It’s time to do this. feincms3 is in its fifth year of existence, several sites built with it have already been archived already, so it’s definitely past due. (django-content-editor (resp. FeinCMS 1.x) more than 12 years old now.)

django-mptt is not maintained anymore

We, the maintainers of django-mptt have marked django-mptt as unmaintained. I have released the current development version as 0.12.0 before proposing this.

PostgreSQL’s ltree extension vs. django-tree-queries’ recursive CTEs

I got the (excellent) question why I wrote that PostgreSQL’s ltree extension didn’t seem a good solution in my post about django-tree-queries. Here’s my current thinking on this.

Going all-in on CSS Grid and PostCSS

I have been using autoprefixer for years already. It’s probably the best-known PostCSS plugin. It automatically adds vendor-specific prefixes to your CSS code (e.g. -moz-*, -webkit-*, -ms-* etc.) depending on a list of browsers you want to support and the Can I use… database.

I wanted to bring bundling times down and searched for alternatives to Webpack. Webpack isn’t the hot new thing anymore but it works really well and performs good enough as long as you do not have extreme amounts of code and plugins. I started with a new, minimal Webpack configuration and was pleasantly surprised that compilation times are more than acceptable when only using babel-loader to transpile JavaScript and some PostCSS. (I may write about the setup at a later time, for now this approach still serves us well and we have even packaged it up as fh-webpack-config.)

Changing the main branch to main

I added the following alias to my .gitconfig to fix the problem where the refs/remotes/origin/HEAD of local repositories would point to master instead of main after renaming the branch on GitHub:

git config --global alias.mainfix "symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main"

git mainfix is easier to type than vim .git/refs/remotes/origin/HEAD and replacing whatever the previous main branch was called with main.

neovim

I have switched from vim to neovim. I don’t exactly remember why but the transition has been seamless. I’m still happy with tmux and vim.