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 Antoliny)

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 Antoliny, 5 weeks ago

comment:1 by Antoliny, 5 weeks ago

Owner: set to Antoliny
Status: newassigned

by Antoliny, 5 weeks ago

comment:2 by Antoliny, 5 weeks ago

Description: modified (diff)

by Sarah Boyce, 5 weeks ago

Attachment: image-20250110-114223.png added

comment:3 by Sarah Boyce, 5 weeks ago

Resolution: invalid
Status: assignedclosed

This exists already but you need to have the admin registered for that model for the link to be available


by Antoliny, 5 weeks ago

Attachment: tabular_inline_link.png added

by Antoliny, 5 weeks ago

Attachment: link_change_2.png added

comment:4 by Antoliny, 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 Antoliny, 4 weeks ago

Description: modified (diff)
Resolution: invalid
Status: closednew
Summary: Add a link to navigate to the object through str in the inline form.Cleanup the inline link format.
Note: See TracTickets for help on using tickets.
Back to Top