[Django] #27743: CSS fix of "viewsitelink", "golink" and "addlink" buttons for Django admin

35 views
Skip to first unread message

Django

unread,
Jan 18, 2017, 8:35:56 AM1/18/17
to django-...@googlegroups.com
#27743: CSS fix of "viewsitelink", "golink" and "addlink" buttons for Django admin
-------------------------------------+-------------------------------------
Reporter: Nick | Owner: nobody
Mavrakis |
Type: | Status: new
Cleanup/optimization |
Component: | Version: master
contrib.admin | Keywords: admin, css,
Severity: Normal | background-position, icon
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 1 |
-------------------------------------+-------------------------------------
This is a minor fix but, in my opinion, its very helpful!

Inside the Django admin change list page, in the upper right corner (ADD
OBJECT button), if the text is too long then the "+" icon overlaps the
text as you can see in the image. This is due to the `background-position:
93% center`
(https://github.com/django/django/blob/master/django/contrib/admin/static/admin/css/base.css#L741).

PROPOSED FIX: Because `background-position` can take up to 4 values due to
`background position edge offsets` (http://caniuse.com/#feat=css-
background-offsets), we can change the above line to:

`background-position: right 7px center;`

The same applies to the other button, `VIEW ON SITE`
(https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.view_on_site),
as well.

--
Ticket URL: <https://code.djangoproject.com/ticket/27743>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 18, 2017, 8:36:55 AM1/18/17
to django-...@googlegroups.com
#27743: CSS fix of "viewsitelink", "golink" and "addlink" buttons for Django admin
-------------------------------------+-------------------------------------
Reporter: Nick Mavrakis | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: admin, css, | Triage Stage:
background-position, icon | Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Nick Mavrakis):

* Attachment "icon_not_align_right.png" added.

django admin list display view, "+" icon overlaps text

Django

unread,
Jan 20, 2017, 2:47:19 PM1/20/17
to django-...@googlegroups.com
#27743: CSS fix of "viewsitelink", "golink" and "addlink" buttons for Django admin
-------------------------------------+-------------------------------------
Reporter: Nick Mavrakis | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: admin, css, | Triage Stage: Accepted
background-position, icon |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* cc: elky (added)
* easy: 1 => 0
* stage: Unreviewed => Accepted


Comment:

ekly, could you review? Nick, could you create a pull request?

--
Ticket URL: <https://code.djangoproject.com/ticket/27743#comment:1>

Django

unread,
Jan 20, 2017, 3:02:51 PM1/20/17
to django-...@googlegroups.com
#27743: CSS fix of "viewsitelink", "golink" and "addlink" buttons for Django admin
-------------------------------------+-------------------------------------
Reporter: Nick Mavrakis | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: admin, css, | Triage Stage: Accepted
background-position, icon |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by elky):

`background-position: right 7px center;` fix is totally fine. It will work
well in all major browsers.

--
Ticket URL: <https://code.djangoproject.com/ticket/27743#comment:2>

Django

unread,
Jan 21, 2017, 2:25:12 AM1/21/17
to django-...@googlegroups.com
#27743: CSS fix of "viewsitelink", "golink" and "addlink" buttons for Django admin
-------------------------------------+-------------------------------------
Reporter: Nick Mavrakis | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: admin, css, | Triage Stage: Accepted
background-position, icon |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Nick Mavrakis):

Sure. I'll make a PR this afternoon!

--
Ticket URL: <https://code.djangoproject.com/ticket/27743#comment:3>

Django

unread,
Jan 21, 2017, 8:37:38 AM1/21/17
to django-...@googlegroups.com
#27743: CSS fix of "viewsitelink", "golink" and "addlink" buttons for Django admin
-------------------------------------+-------------------------------------
Reporter: Nick Mavrakis | Owner: nobody
Type: | Status: new
Cleanup/optimization |

Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: admin, css, | Triage Stage: Accepted
background-position, icon |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Nick Mavrakis):

Pull request created ([https://github.com/django/django/pull/7914]). Thank
you!

--
Ticket URL: <https://code.djangoproject.com/ticket/27743#comment:4>

Django

unread,
Jan 23, 2017, 7:25:07 PM1/23/17
to django-...@googlegroups.com
#27743: CSS fix of "viewsitelink", "golink" and "addlink" buttons for Django admin
-------------------------------------+-------------------------------------
Reporter: Nick Mavrakis | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: contrib.admin | Version: master
Severity: Normal | Resolution: fixed

Keywords: admin, css, | Triage Stage: Accepted
background-position, icon |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"e5c2e43cc832028a974399af07a1c3ba6afa2467" e5c2e43]:
{{{
#!CommitTicketReference repository=""
revision="e5c2e43cc832028a974399af07a1c3ba6afa2467"
Fixed #27743 -- Prevented admin's "+" button icon from overlapping its
label.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27743#comment:5>

Django

unread,
Jan 23, 2017, 7:25:25 PM1/23/17
to django-...@googlegroups.com
#27743: CSS fix of "viewsitelink", "golink" and "addlink" buttons for Django admin
-------------------------------------+-------------------------------------
Reporter: Nick Mavrakis | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: contrib.admin | Version: master
Severity: Normal | Resolution: fixed
Keywords: admin, css, | Triage Stage: Accepted
background-position, icon |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"fb55247d595088df455b3ef814e9366b3db1a4fe" fb55247d]:
{{{
#!CommitTicketReference repository=""
revision="fb55247d595088df455b3ef814e9366b3db1a4fe"
[1.11.x] Fixed #27743 -- Prevented admin's "+" button icon from
overlapping its label.

Backport of e5c2e43cc832028a974399af07a1c3ba6afa2467 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27743#comment:6>

Reply all
Reply to author
Forward
0 new messages