Opened 6 months ago

Closed 6 months ago

Last modified 3 weeks ago

#34994 closed Bug (fixed)

Visual regression in admin checkboxes on mobile

Reported by: Tom Carrick Owned by: Tom Carrick
Component: contrib.admin Version: 4.2
Severity: Release blocker Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tom Carrick)

I think it may have been intentional, but it looks pretty wrong.

https://code.djangoproject.com/attachment/ticket/34994/admin-checkboxes.png

Attachments (2)

admin-checkboxes.png (26.8 KB ) - added by Tom Carrick 6 months ago.
Xnapper-2024-04-18-12.31.19.png (53.9 KB ) - added by Adam Johnson 3 weeks ago.
two checkboxes centred

Download all attachments as: .zip

Change History (22)

by Tom Carrick, 6 months ago

Attachment: admin-checkboxes.png added

comment:1 by Tom Carrick, 6 months ago

Description: modified (diff)

comment:2 by Mariusz Felisiak, 6 months ago

Owner: changed from nobody to Tom Carrick
Status: newassigned
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

comment:4 by Tom Carrick, 6 months ago

Triage Stage: AcceptedUnreviewed
Type: BugUncategorized

comment:5 by Tom Carrick, 6 months ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

oops, sorry

comment:6 by Tom Carrick, 6 months ago

comment:7 by Tom Carrick, 6 months ago

Has patch: set

comment:8 by Natalia Bidart, 6 months ago

As per my testing, this is a regression in d687febce5868545f99974d2499a91f81a32fef5 not in b4817d20b9e55df30be0b1b2ca8c8bb6d61aab07.

in reply to:  8 ; comment:9 by Mariusz Felisiak, 6 months ago

Replying to Natalia Bidart:

As per my testing, this is a regression in d687febce5868545f99974d2499a91f81a32fef5 not in b4817d20b9e55df30be0b1b2ca8c8bb6d61aab07.

Are you sure? I checked with Django 4.2.7 and it's centered, it looks fine in Django 4.1.13.

in reply to:  9 ; comment:10 by Natalia Bidart, 6 months ago

Replying to Mariusz Felisiak:

Replying to Natalia Bidart:

As per my testing, this is a regression in d687febce5868545f99974d2499a91f81a32fef5 not in b4817d20b9e55df30be0b1b2ca8c8bb6d61aab07.

Are you sure? I checked with Django 4.2.7 and it's centered, it looks fine in Django 4.1.13.

Yes, I'm sure. I checked out revno d687febce5868545f99974d2499a91f81a32fef5 and the problem is clearly there, and then I checked out the revno right before it (21757bbdcd6ef31f2a4092fa1bd55dff29214c7a) and the check boxes are OK.

d687febce5868545f99974d2499a91f81a32fef5 was backported to 4.2 in revno 788f7b8100dbef050129bf5c1e0af47e7bc89b28

in reply to:  10 comment:11 by Mariusz Felisiak, 6 months ago

d687febce5868545f99974d2499a91f81a32fef5 was backported to 4.2 in revno 788f7b8100dbef050129bf5c1e0af47e7bc89b28

So it's still a release blocker for Django 4.2.

comment:12 by Natalia <124304+nessita@…>, 6 months ago

Resolution: fixed
Status: assignedclosed

In a89c715c:

Fixed #34994 -- Fixed checkbox layout in admin's change page for narrow screen widths.

Regression in d687febce5868545f99974d2499a91f81a32fef5.

comment:13 by Natalia <124304+nessita@…>, 6 months ago

In 4d33816c:

[5.0.x] Fixed #34994 -- Fixed checkbox layout in admin's change page for narrow screen widths.

Regression in d687febce5868545f99974d2499a91f81a32fef5.

Backport of a89c715c3bcf7ab1a90747cf8658ebce6304b6e4 from main

comment:14 by Natalia <124304+nessita@…>, 6 months ago

In bac9e94:

[4.2.x] Fixed #34994 -- Fixed checkbox layout in admin's change page for narrow screen widths.

Regression in d687febce5868545f99974d2499a91f81a32fef5.

Backport of a89c715c3bcf7ab1a90747cf8658ebce6304b6e4 from main

comment:15 by Natalia Bidart, 6 months ago

Triage Stage: AcceptedReady for checkin

by Adam Johnson, 3 weeks ago

two checkboxes centred

comment:16 by Adam Johnson, 3 weeks ago

This is still broken for fieldsets with a checkbox plus another field on the same line, like:

class SwitcherAdmin(admin.ModelAdmin):
    fieldsets = [
        (
            None,
            {
                "fields": [
                    ("up", "down"),
                ],
            },
        ),
    ]

https://code.djangoproject.com/raw-attachment/ticket/34994/Xnapper-2024-04-18-12.31.19.png

This is due to checkbox-row being only applied when there’s a single checkbox in the row. I am making a small PR that fixes this issue and another, #35386. Follw on that ticket.

comment:17 by Sarah Boyce <42296566+sarahboyce@…>, 3 weeks ago

In bdd76c4:

Fixed #34994, Fixed #35386 -- Applied checkbox-row CSS class unconditionally in Admin.

comment:18 by Sarah Boyce <42296566+sarahboyce@…>, 3 weeks ago

In ffcf6607:

[5.0.x] Fixed #34994, Fixed #35386 -- Applied checkbox-row CSS class unconditionally in Admin.

Backport of bdd76c4c3817d8e3ed5b0450d5e18e4eae096f16 from main.

comment:19 by Sarah Boyce <42296566+sarahboyce@…>, 3 weeks ago

In 0fc8326:

[4.2.x] Fixed #34994, Fixed #35386 -- Applied checkbox-row CSS class unconditionally in Admin.

Backport of bdd76c4c3817d8e3ed5b0450d5e18e4eae096f16 from main.

comment:20 by Sarah Boyce <42296566+sarahboyce@…>, 3 weeks ago

In 256f719:

[4.2.x] Reverted "Fixed #34994, Fixed #35386 -- Applied checkbox-row CSS class unconditionally in Admin."

This reverts commit 0fc832676cd585fa420d583937b5b2318bc2c629.

comment:21 by Sarah Boyce <42296566+sarahboyce@…>, 3 weeks ago

In a42a2fa:

[5.0.x] Reverted "Fixed #34994, Fixed #35386 -- Applied checkbox-row CSS class unconditionally in Admin."

This reverts commit ffcf66071158ed3b5541ed13b4c7381240d1b310.

Note: See TracTickets for help on using tickets.
Back to Top