Make WordPress Core

Opened 16 months ago

Closed 6 months ago

Last modified 3 months ago

#59009 closed defect (bug) (fixed)

units missing in media details

Reported by: presskopp's profile Presskopp Owned by: joedolson's profile joedolson
Milestone: 6.6 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-screenshots has-patch commit
Focuses: Cc:

Description

Some units are missing which have been there before, see #39667

Length and Dimensions have no units anymore. I don't know since when, just found out using v6.3

This is the view you get after clicking a video in media gallery (Attachment Details) and then click on "Edit more details"

Attachments (10)

units-missing.png (10.7 KB) - added by Presskopp 16 months ago.
details.png (65.2 KB) - added by Presskopp 16 months ago.
59009.diff (1.8 KB) - added by Presskopp 16 months ago.
units_details.png (11.8 KB) - added by Presskopp 16 months ago.
units.png (10.9 KB) - added by Presskopp 16 months ago.
59009.2.diff (2.6 KB) - added by joedolson 6 months ago.
Patch re-using existing "length by height pixels" string
attachment-details-before-patch.png (54.9 KB) - added by shailu25 6 months ago.
Attachment Details - Before Patch
edit-more-details-before-patch.png (255.1 KB) - added by shailu25 6 months ago.
Edit More Details Screen - Before Patch
attachment-details-after-patch.png (414.4 KB) - added by shailu25 6 months ago.
Attchment Details Units - After Patch
edit-more-details-after-patch.png (259.0 KB) - added by shailu25 6 months ago.
Edit More Details Screen Units - After Patch

Download all attachments as: .zip

Change History (22)

#1 @audrasjb
16 months ago

Hello,

It seems that [43633] and [44481] (from #39667) only improved media-template.php and not media.php where I believe the strings you mentioned come from.

See https://github.com/WordPress/wordpress-develop/blob/6.3/src/wp-admin/includes/media.php#L1665

#2 @Presskopp
16 months ago

btw: same issue in attachment details view.

The specific 'Dimensions' are generated in
https://github.com/WordPress/wordpress-develop/blob/6.3/src/wp-admin/includes/media.php#L3304

@Presskopp
16 months ago

@Presskopp
16 months ago

#3 @Presskopp
16 months ago

  • Keywords has-patch added; needs-patch removed

@Presskopp
16 months ago

#4 @Presskopp
16 months ago

added screenshots after patch

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


7 months ago

#6 @joedolson
7 months ago

  • Milestone changed from Awaiting Review to 6.6
  • Owner set to joedolson
  • Status changed from new to accepted

#7 @joedolson
7 months ago

  • Keywords changes-requested added

Noting that in the modal, the text is "num by num pixels", and this patch makes the non-modal view "num x num px". For consistency and clarity, let's set both of them to the current string, using plain text and unabbreviated terminology.

@joedolson
6 months ago

Patch re-using existing "length by height pixels" string

#8 @joedolson
6 months ago

  • Keywords changes-requested removed

Updated the patch to re-use the existing string for giving file dimensions.

#9 @shailu25
6 months ago

Test Report

Patch Tested: https://core.trac.wordpress.org/attachment/ticket/59009/59009.2.diff

Environment:

WordPress - 6.5.3
OS - Windows
Browser - Firefox
Theme: Twenty Seventeen
PHP - 8.1.23

Actual Results:

  • Length and Dimensions units are showing in Attachment Details & Edit More Details(Click On Edit More Details) Screen with patch.✅

@shailu25
6 months ago

Attachment Details - Before Patch

@shailu25
6 months ago

Edit More Details Screen - Before Patch

@shailu25
6 months ago

Attchment Details Units - After Patch

@shailu25
6 months ago

Edit More Details Screen Units - After Patch

#10 @joedolson
6 months ago

  • Keywords commit added

Thanks for testing @shailu25!

I think this is good to go; marking for commit.

#11 @joedolson
6 months ago

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

In 58217:

Media: Add missing units for length and dimensions in media library.

Include explicit units for media length and dimensions in attachment modal and media details screen.

Props Presskopp, joedolson, shailu25, audrasjb.
Fixes #59009.

This ticket was mentioned in Slack in #core-media by joedolson. View the logs.


3 months ago

Note: See TracTickets for help on using tickets.