wordpress-mobile / MediaPicker-iOS

WPMediaPicker is an iOS controller that allows capture and picking of media assets.
GNU General Public License v2.0
110 stars 37 forks source link

Fix: position of empty view to avoid message disappearing when keyboard shows up #397

Closed diogo-lins closed 1 year ago

diogo-lins commented 1 year ago

Fixes #18840, #19514

Description

Before changes

https://user-images.githubusercontent.com/20734091/197835979-4dbc38c4-3cc8-4ac3-8c08-69f6f1b60c03.mp4

After changes

Blog Post - With Images Blog Post - Without Images Media - With Images Media - Without Images
Blog-WithImages Blog-WithoutImages Media-WithImages Media-WithoutImages

Gray space before Gray space after

Testing instructions

This can be tested by cloning my fork(and branch) and changing the WordPress-iOS Podfile to use the Pod locally:

pod 'WPMediaPicker', :path => '...'
  1. Run the app
  2. Switch to a site that has no media uploaded
  3. Open Blog Post and add an IMAGE block
  4. Make sure that the custom empty view is displayed correctly
  5. Opens the Keyboard
  6. Make sure that the message No media matching your search is displayed correctly