Make WordPress Core

Opened 8 months ago

Closed 8 months ago

Last modified 5 weeks ago

#64883 closed defect (bug) (fixed)

Visual issues with new Media Library grid view

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

Description

I noticed a couple of issues with the Media Library grid view since [61757] was committed to fix #23562:

  1. When uploading a file, the placeholder containing the progress bar has a white bar at the bottom.
  1. The vertical position of the "Bulk select" button looks like it's off by a few pixels. I think it would look better if it were vertically aligned with the dropdowns.

Attachments (2)

media-library.png​ (105.3 KB ) - added by siliconforks 8 months ago.
uploading.png​ (4.6 KB ) - added by Presskopp 8 months ago.

Download all attachments as: .zip

Change History (18)

#1 @joedolson
8 months ago

  • Owner set to joedolson
  • Status new → accepted

#2 @Presskopp
8 months ago

the white stripe is expecting the title of the video as an aria-label. Since there is none while uploading, a patching approach could be to change the following line:

'aria-label': this.model.get( 'title' ), in wp-includes\js\media-views.js to e.g:

'aria-label': this.model.get( 'title' ) || 'uploading...',

about the disalignment, this can be fixed by the following CSS:

.media-frame.mode-grid.mode-edit .media-toolbar-secondary > .select-mode-toggle-button {
    margin: 0 8px 2px 0;
}

(instead of margin: 0 8px 0 0;)

#3 @Presskopp
8 months ago

  • Keywords has-screenshots added

#4 @joedolson
8 months ago

I'm debating with myself over the value of adding this visible text. It technically adds a little clarity, perhaps, over the uploading animation. Alternately, this could be resolved in CSS by setting the content to none when the li has the .uploading class.

For long uploads, however, it would give the container a label which could be discovered by exploring. That could be helpful if things are taking a long time.

#5 @joedolson
8 months ago

For the CSS misalignment, the problem is that the flex container doesn't have align-items: end, so not all items are getting the same alignment. That change would need some testing in other contexts.

#6 @joedolson
8 months ago

  • Milestone Awaiting Review → 7.0

This ticket was mentioned in ​PR #11330 on ​WordPress/wordpress-develop by ​@joedolson.


8 months ago
#7

  • Keywords has-patch added

Option 1 for fixing media library grid issues.

Trac ticket: https://core.trac.wordpress.org/ticket/64883

## Use of AI Tools

#8 @ozgursar
8 months ago

Patch Testing Report

Patch Tested: ​https://github.com/WordPress/wordpress-develop/pull/11330

Environment

  • WordPress: 7.0-beta6-62085-src
  • PHP: 8.2.29
  • Server: nginx/1.29.4
  • Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
  • Browser: Opera
  • OS: macOS
  • Theme: Twenty Fourteen 4.4
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.1

Steps taken

  1. Go to Media
  2. Observe the vertical misalignment of the Bulk select button according to the dropdowns
  3. Upload any image and observe the white line under progress bar
  4. Apply patch
  5. Observe the proper vertical alignment of the Bulk select button
  6. Observe the uploading... text appear
  7. ✅ Patch is solving the problem

Expected result

  • Bulk select button should align vertically with the dropdowns
  • When the progress bar is visible, we should see the uploading... text in the label

Screenshots/Screencast with results

Before
https://i.imgur.com/RAT63JB.png

After
https://i.imgur.com/N8mBRra.png

#9 @ozgursar
8 months ago

I just noticed that on large screens dropdowns and Bulk select button are exactly 32px.

However, on smaller screens, dropdowns enlarge to 36.28px, while Bulk select button to 34.3px causing a small vertical misalignment.

https://i.imgur.com/Uq377fE.jpeg

This ticket was mentioned in ​Slack in #core by mukeshpanchal27. ​View the logs.


8 months ago

#12 @joedolson
8 months ago

  • Keywords commit added

#13 @joedolson
8 months ago

  • Resolution → fixed
  • Status accepted → closed

In 62104:

Media: Fix visual issues in media library grid view.

Populate the uploading progress bar visual naming element. Provides a nominal accessibility improvement, in that long uploads can be found and recognized during the upload process. Fix an alignment issue in the bulk select button. Follow up to [61757].

Props siliconforks, presskopp, ozgursar, joedolson.
Fixes #64883.

#14 @joedolson
8 months ago

In 62105:

Media: Fix uploading media string.

Replace the incorrect three stops with an appropriate ellipsis in the string. Follow up to [62104].

Props presskopp, joedolson.
See #64883.

#15 @joedolson
4 months ago

In 62892:

Media: Use correct fallback aria-label for untitled images.

In the media library, the aria-label for an untitled image fell back to "uploading...", the string used during the upload processing. Change the values so that images only use "uploading..." during the uploading process, but otherwise use "(no title)", like other untitled items.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/12136

Props jamieburchell, presskopp, khokansardar, joedolson, tusharaddweb, ankitkumarshah, chillifish, masteradhoc, cbravobernal.
Fixes #65438, see #64883.

#16 @afercia
5 weeks ago

In 64293:

Media: Improve the updating of the attachments tiles labels.

  • Makes sure the attachments visible label (and aria-label) is updated and it's not stale showing "uploading..." or "(no title)" for attachments whose models load after the view is created.
  • Add QUnit tests.

Developed in ​https://github.com/WordPress/wordpress-develop/pull/13053

Props sureshsornapudi09, archon810, rezwanshiblu1952, joedolson, afercia.
See #23562, #64883, #65438.
Fixes #65852.

Note: See TracTickets for help on using tickets.