Make WordPress Core

Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#59009 closed defect (bug) (fixed)

units missing in media details

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

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 3 years ago.
details.png (65.2 KB ) - added by Presskopp 3 years ago.
59009.diff (1.8 KB ) - added by Presskopp 3 years ago.
units_details.png (11.8 KB ) - added by Presskopp 3 years ago.
units.png (10.9 KB ) - added by Presskopp 3 years ago.
59009.2.diff (2.6 KB ) - added by joedolson 2 years ago.
Patch re-using existing "length by height pixels" string
attachment-details-before-patch.png (54.9 KB ) - added by shailu25 2 years ago.
Attachment Details - Before Patch
edit-more-details-before-patch.png (255.1 KB ) - added by shailu25 2 years ago.
Edit More Details Screen - Before Patch
attachment-details-after-patch.png (414.4 KB ) - added by shailu25 2 years ago.
Attchment Details Units - After Patch
edit-more-details-after-patch.png (259.0 KB ) - added by shailu25 2 years ago.
Edit More Details Screen Units - After Patch

Download all attachments as: .zip

Change History (22)

#1 @audrasjb
3 years 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
3 years 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
3 years ago

@Presskopp
3 years ago

#3 @Presskopp
3 years ago

  • Keywords has-patch added; needs-patch removed

@Presskopp
3 years ago

#4 @Presskopp
3 years ago

added screenshots after patch

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


2 years ago

#6 @joedolson
2 years ago

  • Milestone Awaiting Review6.6
  • Owner set to joedolson
  • Status newaccepted

#7 @joedolson
2 years 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
2 years ago

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

#8 @joedolson
2 years ago

  • Keywords changes-requested removed

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

#9 @shailu25
2 years 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
2 years ago

Attachment Details - Before Patch

@shailu25
2 years ago

Edit More Details Screen - Before Patch

@shailu25
2 years ago

Attchment Details Units - After Patch

@shailu25
2 years ago

Edit More Details Screen Units - After Patch

#10 @joedolson
2 years ago

  • Keywords commit added

Thanks for testing @shailu25!

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

#11 @joedolson
2 years ago

  • Resolutionfixed
  • Status acceptedclosed

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.


2 years ago

Note: See TracTickets for help on using tickets.