Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#42535 closed defect (bug) (fixed)

Remove checkered background for icons in Attachment Details

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.0 Priority: normal
Severity: normal Version: 4.9
Component: Media Keywords: has-patch commit
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 years ago.
42535.diff (449 bytes) - added by BandonRandon 7 years ago.
Screen Shot 2017-11-14 at 12.09.29 AM.png (266.3 KB) - added by BandonRandon 7 years ago.
After patch applied
42535.patch (761 bytes) - added by janak007 7 years ago.
Added patch to fix the background image

Download all attachments as: .zip

Change History (13)

@SergeyBiryukov
7 years ago

#1 in reply to: ↑ description @SergeyBiryukov
7 years 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 years 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 years ago

@BandonRandon
7 years ago

After patch applied

#3 @johnbillion
7 years ago

  • Milestone changed from Awaiting Review to 4.9.1

#4 @johnbillion
7 years ago

  • Milestone changed from 4.9.1 to 5.0

@janak007
7 years ago

Added patch to fix the background image

#5 @BandonRandon
7 years 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
7 years 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.

#7 @johnbillion
6 years ago

  • Keywords good-first-bug needs-testing removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

[42642] should be merged into 5.0

#8 @pento
6 years ago

  • Keywords commit added

👍🏻

#9 @SergeyBiryukov
6 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 43745:

Media: Remove checkered background for icons in Attachment Details.

Props BandonRandon.
Merges [42642] to the 5.0 branch.
Fixes #42535. See #41948.

Note: See TracTickets for help on using tickets.