[wp-trac] [WordPress Trac] #47527: Add visible class to media library sidebar on library frames

WordPress Trac noreply at wordpress.org
Tue Jun 11 20:42:27 UTC 2019


#47527: Add visible class to media library sidebar on library frames
------------------------------+-----------------------------
 Reporter:  jorgefilipecosta  |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Media             |    Version:  trunk
 Severity:  normal            |   Keywords:  has-patch
  Focuses:  ui                |
------------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47527>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list