WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 5 months ago

#42535 closed defect (bug) (fixed)

Remove checkered background for icons in Attachment Details

Reported by: SergeyBiryukov Owned by: SergeyBiryukov
Milestone: 5.0 Priority: normal
Severity: normal Version: 4.9
Component: Media Keywords: good-first-bug has-patch needs-testing
Focuses: ui, administration Cc:

Description

#41948 added a checkered background for transparent images in Attachment Details modal.

This is not necessary for icons, see the screenshot. Adjusting [41569] to only apply the styles to images without .icon class should fix the issue.

To reproduce, upload a PDF file to a server without Imagick, ImageMagick, or Ghostscript, and open the Attachment Details window.

Attachments (4)

42535.PNG (15.6 KB) - added by SergeyBiryukov 7 months ago.
42535.diff (449 bytes) - added by BandonRandon 7 months ago.
Screen Shot 2017-11-14 at 12.09.29 AM.png (266.3 KB) - added by BandonRandon 7 months ago.
After patch applied
42535.patch (761 bytes) - added by janak007 5 months ago.
Added patch to fix the background image

Download all attachments as: .zip

Change History (10)

@SergeyBiryukov
7 months ago

#1 in reply to: ↑ description @SergeyBiryukov
7 months ago

To reproduce, upload a PDF file to a server without Imagick, ImageMagick, or Ghostscript, and open the Attachment Details window.

Can be reproduced with a ZIP file as well.

#2 @BandonRandon
7 months ago

  • Keywords has-patch needs-testing added; needs-patch removed

Tested in Chromium and Firefox but could use further testing.

Another option would be to use the CSS3 Selector of :not(.icon) for the background properties but the override method in the patch is perhaps simpler.

@BandonRandon
7 months ago

@BandonRandon
7 months ago

After patch applied

#3 @johnbillion
7 months ago

  • Milestone changed from Awaiting Review to 4.9.1

#4 @johnbillion
7 months ago

  • Milestone changed from 4.9.1 to 5.0

@janak007
5 months ago

Added patch to fix the background image

#5 @BandonRandon
5 months ago

  • Version set to 4.9

Hi @janak007 I could be missing something but it looks like your patch is always removing the checked background added in #41948.

The background image itself should remain just be hidden when an icon is shown (like with a PDF or video file). This should be what happens when you apply 42535.diff Could you test to make sure that's happening for you?

As a small administrative note, when iterating an existing patch to a ticket it's generally recommended to add a patch number. For example, your patch would be 42535.2.diff. This makes it easy to see the latest patch to grab when testing.

Thanks for contributing to WordPress core :)

#6 @SergeyBiryukov
5 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 42642:

Media: Remove checkered background for icons in Attachment Details.

Props BandonRandon.
Fixes #42535. See #41948.

Note: See TracTickets for help on using tickets.