Opened 5 weeks ago
Last modified 4 weeks ago
#36080 closed Cleanup/optimization
Cleanup the inline link format. — at Version 5
Reported by: | Antoliny | Owned by: | Antoliny |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | Inline, Link |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
when show_change_link
is applied, the icon image appears slightly cropped in TabularInline
. Also, the Change and View text is applied depending on the user's permissions, but the permission-related details are already exposed in the form.
Therefore, how about simply adding the link to the object's __str__
?
I think it looks cleaner when the link is added to the __str__
(removed icon and text).
Additionally, what do you think about changing the default value of show_change_link to True?
Changing it to True could also improve accessibility.
Change History (10)
by , 5 weeks ago
Attachment: | tabular_inline_object_str_link.png added |
---|
comment:1 by , 5 weeks ago
Owner: | set to |
---|---|
Status: | new → assigned |
by , 5 weeks ago
Attachment: | inline_object_str_add_link.png added |
---|
comment:2 by , 5 weeks ago
Description: | modified (diff) |
---|
by , 5 weeks ago
Attachment: | image-20250110-114223.png added |
---|
comment:3 by , 5 weeks ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
by , 5 weeks ago
Attachment: | tabular_inline_link.png added |
---|
by , 5 weeks ago
Attachment: | link_change_2.png added |
---|
comment:4 by , 5 weeks ago
Ah, this functionality is already provided through the show_change_link attribute! However, when show_change_link is applied, the icon image appears slightly cropped in TabularInline. Also, the Change and View text is applied depending on the user's permissions, but the permission-related details are already exposed in the form.
Therefore, what do you think about simply adding the link to the object's str and change the default value of the show_change_link to True? (This includes StackedInline as well.) I think this approach would be cleaner, more intuitive, and would enhance accessibility without losing any clarity.
comment:5 by , 4 weeks ago
Description: | modified (diff) |
---|---|
Resolution: | invalid |
Status: | closed → new |
Summary: | Add a link to navigate to the object through str in the inline form. → Cleanup the inline link format. |
This exists already but you need to have the admin registered for that model for the link to be available