Skip to content

Commit

Permalink
Prepare 1.18.1 release (#10854)
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Mar 8, 2022
1 parent 9164bb9 commit 5c62997
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function getImageResourceFromAttachment(attachment) {
const {
id,
date_gmt,
media_details: { width, height, sizes: _sizes },
media_details: { width, height, sizes: _sizes = {} } = {},
mime_type: mimeType,
alt_text: alt,
source_url: src,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ const getResourceFromMediaPicker = (mediaPickerEl) => {
height,
length,
length_formatted: lengthFormatted,
sizes: _sizes,
},
sizes: _sizes = {},
} = {},
web_stories_media_source: mediaSource,
web_stories_is_muted: isMuted,
web_stories_base_color: baseColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,69 @@ describe('getResourceFromMediaPicker', () => {
})
);
});

it('should return resource for VTT file', () => {
const mediaPickerEl = {
id: 1234,
title: 'captions',
filename: 'captions.vtt',
url: 'https://example.com/wp-content/uploads/captions.vtt',
link: 'https://example.com/captions/',
alt: 'captions',
author: '1',
description: '',
caption: '',
name: 'captions',
status: 'inherit',
uploadedTo: 0,
date: '2021-11-12T11:15:56.000Z',
modified: '2021-11-12T11:15:56.000Z',
menuOrder: 0,
mime: 'text/vtt',
type: 'text',
subtype: 'vtt',
icon: 'https://example.com/wp-includes/images/media/text.png',
dateFormatted: 'November 12, 2021',
nonces: {
update: 'a43563250f',
delete: '813aa798e6',
edit: '2a2853a1b9',
},
editLink: 'https://example.com/wp-admin/post.php?post=1234&action=edit',
meta: false,
authorName: 'Pascal',
authorLink: 'https://example.com/wp-admin/profile.php',
filesizeInBytes: 17551,
filesizeHumanReadable: '17 KB',
context: '',
compat: {
item: '',
meta: '',
},
web_stories_base_color: '',
web_stories_blurhash: '',
media_details: [],
web_stories_media_source: 'editor',
};

expect(getResourceFromMediaPicker(mediaPickerEl)).toStrictEqual(
expect.objectContaining({
alt: 'captions',
baseColor: '',
blurHash: '',
creationDate: '2021-11-12T11:15:56.000Z',
id: 1234,
isExternal: false,
isMuted: false,
isOptimized: false,
isPlaceholder: false,
mimeType: 'text/vtt',
needsProxy: false,
length: 0,
src: 'https://example.com/wp-content/uploads/captions.vtt',
type: 'text',
sizes: {},
})
);
});
});
23 changes: 9 additions & 14 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ Web Stories are powered by [AMP](https://amp.dev/), which adds some restrictions

For the plugin's full changelog, please see [the Releases page on GitHub](https://github.com/googleforcreators/web-stories-wp/releases).

= 1.18.1 =

**Release Date:** March 8, 2022.

* Fixes an issue where adding video captions did not work.

= 1.18.0 =

**Release Date:** March 1, 2022.
Expand All @@ -129,18 +135,11 @@ For the plugin's full changelog, please see [the Releases page on GitHub](https:
* Enhancement: improved element resizing handling.
* Bug fixes and performance improvements.

= 1.16.0 =
== Upgrade Notice ==

**Release Date:** January 18, 2022.
= 1.18.1 =

* Compatibility with WordPress 5.9
* New feature: improved video captions appearance in the editor.
* New feature: duplicate elements via right-click menu.
* Enhancement: use static images for displaying saved templates in the editor.
* Enhancement: improved appearance when exploring templates in the dashboard.
* Bug fixes and performance improvements.

== Upgrade Notice ==
This release fixes an issue where adding video captions did not work.

= 1.18.0 =

Expand All @@ -149,7 +148,3 @@ New pre-publish confirmation dialog, semantic headings, and several bug fixes an
= 1.17.0 =

Various smaller enhancements throughout the editor, plus several bug fixes and performance improvements.

= 1.16.0 =

WordPress 5.9 compatibility, various UI refinements, right-click menu element duplication, and several bug fixes and performance improvements.

0 comments on commit 5c62997

Please sign in to comment.