xwp / unsplash-wp

GNU General Public License v2.0
9 stars 3 forks source link

[WIP] Create custom view for unsplash. #135

Closed spacedmonkey closed 4 years ago

spacedmonkey commented 4 years ago

Summary

Work in progress.

This is a custom view for the unsplash media selector.

To test.

  1. Checkout branch.
  2. Open console.
  3. Type const test = new wp.media.view.MediaFrame.Unsplash. Then enter.
  4. Type test.open(); Then enter.

Fixes #129

Checklist

ravichdev commented 4 years ago

@spacedmonkey This works really well, the only issue I am seeing is the search field in the modal does not get the focus on modal open.

spacedmonkey commented 4 years ago

@spacedmonkey This works really well, the only issue I am seeing is the search field in the modal does not get the focus on modal open.

I can fix this.

ravichdev commented 4 years ago

I am also seeing a weird bug, open the normal media modal with all the tabs, select any tab except "Unsplash", close the modal and reload the page. Now if you do const test = new wp.media.view.MediaFrame.Unsplash and test.open(); the modal will open but the content will be blank.

spacedmonkey commented 4 years ago

I am also seeing a weird bug, open the normal media modal with all the tabs, select any tab except "Unsplash", close the modal and reload the page. Now if you do const test = new wp.media.view.MediaFrame.Unsplash and test.open(); the modal will open but the content will be blank.

I fix that issue here - https://github.com/xwp/unsplash-wp/pull/135/commits/3c361192d738440befb5cb1c321e356d92a5dfb1

ravichdev commented 4 years ago

Thank you for the fix @spacedmonkey . Closing this PR out as these changes are merged into PR #143