I have implemented the improvements I had in mind into the InlineForm
InlineForm header new feature.
In addition, further steps are needed, such as adjusting the position of the “x” button and handling cases where the string used as a link is empty.
Still, I believe the changes above are enough to show the InlineForm header as I envision it.
I can relate to many aspects of why the current Inline design was implemented.
I had wondered why the text of the object’s str used in the Form Header of TabularInline is small.
However, since TabularInline represents fields in rows, the height of the Form within TabularInline is not large, so there’s no need for the object’s str text to be large.
(Nevertheless, I still feel that the current text size is too small.)
On the other hand, StackedInline represents fields in columns, and as the number of fields increases, the height of each Form grows as well.
In this case, the object’s str serves as a separator between the Forms.
Therefore, I understand that the object’s str is displayed larger and that the model name was added to the suffix.
The reason I made the TabularInline header the same as the StackedInline header is because I felt that the StackedInline header provides better UX
(of course, adjustments to the font size and padding are needed).
This is because, just like in StackedInline, the height of the page in TabularInline also increases as the number of objects grows. Ultimately, whether it’s TabularInline or StackedInline, I believe the current StackedInline header is better when there are many objects.
However, the StackedInline header doesn’t feel out of place when there are fewer objects either.
The reason I added a link to the object string itself is that I thought this approach was much cleaner. I felt that there was no need to display text like “View” or “Change” — adding a link directly to the string itself is intuitive enough.
(However, it is important to clearly distinguish it from the “View on Site” link that appears when the show_url attribute is True.)
I’m curious to know what others think about the InlineForm Header. I’d love to discuss it more and I feel there is room for improvement.