Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
External Media: Implementation (#15717)
* external-media: Add /list endpoint * external-media-endpoint: update wpcom path * Add file to phpcs whitelist * external-media: propagate `search` term to the end * fse: add `/copy` external media endpoint * external-media: whitelist `list` endpoint args * external-media: add `connection` endpoint * external-media: tidy code * external-media: fix connection endpoint path * externa-media: add text domain to translations * external-image: fix typo * external-media: adjust `media` copy arg * Add some comments * Properly pass on WP_Error responses * Properly pass on response status * Use 1.1 endpoint to establish connection * Handle Google file names * External Media: Add Editor integration (#15721) * add external media code * proper translation calls * css classes scoping * include styles in build * removed extra file * remove interpolation * extract google photos logo * collocate icons * use external package for auth modal * use named export for JetpackLogo * rewrite MediaItem to functional * rewrite PexelsMedia to functional * extract some code * extract CopyingMedia * rewrite MediaBrowser to functional * split google photos auth and media handling * rewrite the auth to functional * translation * remove auth remains from media * rewrite google photos to functional * use simpler method to resize modal within Gutenberg constraints * align notices * update whitespace * Document grandfathered class Props @jeherve See #15721 (comment) * add missing dependency in hook * remove hook dependency * Use Gutenberg base styles Props @jeherve. * Add request external access package * Move requestExternalAccess to external deps * fix load more photos from google photos * Fix load more for pexels * Simplify prop * external-media: fix pexels searcher * external-media: handling seacher button * Use updated connection endpoint. * external-media: fix google albums section * external-media: set mediaType acording to prop Co-authored-by: Konstantin Obenland <obenland@gmx.de> Co-authored-by: retrofox <rdsuarez@gmail.com> * external-media: restore appying google filters * external-media: whitelist `filter` endpoint arg * Improve sanitization/validation for copy endpoint * Separate out more media upload steps * Further split out API methods * API updates to work on dotcom * change filter priority so it plays nice with AMP plugin * Keep parsing responses when not using wpcomFetch * Remove erroneous typeof * Remove Pexels example query prone to unexpected results * Avoid duplocate content headers Setting the content type here duplicates the string when passing `data`, which in return prevents the API from parsing the JSON payload. * Remove unused scss vars * Use color var for image placeholder bg * Run editor.scss through Prettier * Export with memo call instead of naming the func twice * Rewrap long comments * External Media: Fix Pexels search markup (#15853) * Use type=search on the search input for pexels * Add aria-label to search input * Fix display of insert button in IE 11 * External Media: Use ul and li for media items with checkbox role to be in line with the core media library interaction (#15850) * Add NavigableMenu component for arrow key use and trapping focus. Adds missing aria states from toggle button. (#15856) * Only show External MEdia to connected users * Improve error handling in list endpoint * Make error message translatable * Simplify Favorites label * Use keyCode over which * Fix invalid DOM property warning * Reuse existing translation strings * Only replace button for image blocks * External Media: Improve modal elements focus for better a11y (#15868) * Add media type information Needed for media-text block. * [not verified] Be more specific about button margins Co-authored-by: Konstantin Obenland <obenland@gmx.de> Co-authored-by: Marek Hrabe <marekhrabe@me.com> Co-authored-by: Michael P. Pfeiffer <michael@cssconf.eu> Co-authored-by: Bart <bartlomiej.kalisz@gmail.com> Co-authored-by: Jerry Jones <jones.jeremydavid@gmail.com>
- Loading branch information