WordPress.org

Make WordPress Core

Opened 5 days ago

Last modified 4 days ago

#47527 new defect (bug)

Add visible class to media library sidebar on library frames

Reported by: jorgefilipecosta Owned by:
Milestone: 5.3 Priority: normal
Severity: normal Version: trunk
Component: Media Keywords: has-patch
Focuses: ui Cc:

Description

The visible class as the code comment specifies is used to " Show the sidebar on mobile". This ensures that when a user selects an image on the media library even on mobile, the user can still see the image/file details.
This class is only added for insert frames. Insert frames are used by the classic editor to insert images, audio, and the media widgets also use them. Most tutorials I checked related to media library usage in plugins end up using the "library" frame, so I guess most plugins use this frame. The block editor also uses the library frame most of the times, so the block editor contains a bug where on mobile the media sidebar with the details of the selected file does not appear. I think this bug will also affect the media sidebar of most WordPress plugins.

I don't think there is a reason to not add the visible class in the library frame, and in my tests, I did not found any regression with this change.

With these changes when we are on a small screen e.g:600px, we add an image block on the block editor, we press the media upload button to open the media library and then we select a file we are able to see the file details, without this changes we don't see the sidebar at all.

More details of the issue are available in the Gutenberg repository https://github.com/WordPress/gutenberg/issues/10232.

Attachments (1)

47527.diff (459 bytes) - added by jorgefilipecosta 5 days ago.

Download all attachments as: .zip

Change History (2)

#1 @SergeyBiryukov
4 days ago

  • Milestone changed from Awaiting Review to 5.3
Note: See TracTickets for help on using tickets.