Iommi (https://docs.iommi.rocks/en/latest/ #Django) feels magical and weird at the same time. Not sure yet whether I like it :) (Found it while looking for a django-tables2 replacement because it is too limiting for what I need of it). Any experiences with it?
iommi 7.5.0 documentation

Gotta try writing a style for patternfly and see how that works out...

@apollo13 At some point I want to write a blog post like "Why iommi is so weird" 🤣

TLDR: were many small steps, each fixing a problem. It's just that the entire path was largely taken inside me and my co-conspirator's head over 10 years as we developed tri.table, tri.query, tri.form, tri.declarative and then remade all that into iommi. https://kodare.net/2024/09/03/admin-replacement.html tells just a small part of the story. And https://kodare.net/2024/09/11/why-we-wrote-a-new-form-library-for-django.html another part.

How to build an alternate Django admin in only 10 years

In “So you want a new admin?” Jacob Kaplan-Moss writes about the cost and manpower it took to design the Django Admin system. TLDR: The original version was built by a team of 5 people working tightly with users for over a year, then it has been polished for over a decade after that. He estimates $1 million dollars to design a new one.

En kodare
@boxed Haha fair enough, but it solves (I guess -- not that far yet) real problems that are rather gnarly. I guess I just find those long lines with so many dunders hard to read. Will play a bit with it and read through all the articles 😊

@apollo13 The dunder paths are just syntax sugar for nested dicts really. So like `columns__foo__display_name='foo'` is shorthand for `columns=dict(foo=dict(display_name='foo'))`

Once you get that, the dunder paths become much less intimidating.

@boxed I kinda get that. Still having a hard time figuring out how I can apply a css class to the thead and tr tags.
@boxed I guess I have to override header__template. Let me see
@apollo13 https://docs.iommi.rocks/en/latest/cookbook_tables.html#how-do-i-customize-the-rendering-of-a-row for tr tag. Hmm. Looks like thead isn't really configurable without replacing the entire template. I opened an issue on github for that: https://github.com/iommirocks/iommi/issues/578
Tables - iommi 7.5.0 documentation

@boxed oh I meant the tr inside thead, adjusting the row template there does not help: https://github.com/iommirocks/iommi/blob/master/iommi/templates/iommi/table/table_header_rows.html#L3 -- before you act on the issues let me finish the table stuff for patternfly first and I give it to you for review. Maybe I am missing some obvious shortcuts somewhere (the docs are a bit hard to navigate) and some fixes might not be needed.
iommi/iommi/templates/iommi/table/table_header_rows.html at master · iommirocks/iommi

Your first pick for a django power cord. Contribute to iommirocks/iommi development by creating an account on GitHub.

GitHub

@apollo13 Ah. Sure thing.

If you have some feedback on the docs I would love to hear it. It's been quite hard to write docs for iommi, partly because I don't write this type of docs enough probably, and partly just because I'm too much of an insider to know what needs explaining. I write a ton of it based on feedback and questions.

The cookbook parts are probably the most useful for beginners, before the philosophy clicks.

@boxed ha, you are absolutely asking the wrong person when it comes to docs 😜 What I could imagine to be useful (or did I miss that in the docs) would be images of forms and tables and how the objects map to the DOM. Ie you could put a circle around thead.tr and mark it as Column.header etc. would make it easier to visualize how the table is actually composed (the debugger is nice but I feel like images in the docs would go a long way). Not sure how maintainable such images would be.

@apollo13 Hmm.. kindof like the picker data, but exploded? I like it. I think the right approach isn't an image, but building HTML and showing that in the docs.

All the examples in the docs (except the video) are iframes with the actual output of running the code of example above it. That's way more maintainable than screenshots, and work better on mobile, AND you can do inspect element and look at the DOM.

@boxed agreed wrt images. I guess anything that gives you a quick overview of what goes where would be helpful. So far my tests are promising -- could override everything (partially via tenplates which is okay) but now stuck at https://github.com/iommirocks/iommi/issues/579
Cannot set classes with a callable if the contain `__` in the classname. · Issue #579 · iommirocks/iommi

While trying to create a style for patternfly6 which uses class names like pf-v6-c-table__sort I ran into the issue that I cannot set this to a callable: my_style = Style( base, Column=dict( header...

GitHub

@apollo13 Hm, yea, that's clearly a bug. I'm discussing this one with Johan who is the brain behind the fiddly parts of iommi.

Is this a part of implementing a patternfly style? I saw your post about that now and realized I didn't properly react at the time. I would love to have that included in iommi.

The discord is maybe the best place to collaborate on things like this, if you want to join it.

Oh, and the live style editor is another tool that can make building a style nicer.