@wordpress/block-library 9.0.1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/comment-date/edit.js +1 -1
- package/build/comment-date/edit.js.map +1 -1
- package/build/list-item/edit.native.js +1 -15
- package/build/list-item/edit.native.js.map +1 -1
- package/build/missing/edit.native.js +29 -4
- package/build/missing/edit.native.js.map +1 -1
- package/build/post-content/index.js +13 -1
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/edit.js +1 -1
- package/build/post-date/edit.js.map +1 -1
- package/build/pullquote/index.js +13 -0
- package/build/pullquote/index.js.map +1 -1
- package/build/query/edit/inspector-controls/create-new-post-link.js +10 -10
- package/build/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +2 -2
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/quote/index.js +13 -0
- package/build/quote/index.js.map +1 -1
- package/build/verse/index.js +13 -0
- package/build/verse/index.js.map +1 -1
- package/build-module/comment-date/edit.js +2 -2
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/list-item/edit.native.js +2 -16
- package/build-module/list-item/edit.native.js.map +1 -1
- package/build-module/missing/edit.native.js +30 -5
- package/build-module/missing/edit.native.js.map +1 -1
- package/build-module/post-content/index.js +13 -1
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/edit.js +2 -2
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/pullquote/index.js +13 -0
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/create-new-post-link.js +10 -10
- package/build-module/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +2 -2
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/quote/index.js +13 -0
- package/build-module/quote/index.js.map +1 -1
- package/build-module/verse/index.js +13 -0
- package/build-module/verse/index.js.map +1 -1
- package/build-style/editor-rtl.css +0 -11
- package/build-style/editor.css +0 -11
- package/build-style/navigation/editor-rtl.css +0 -11
- package/build-style/navigation/editor.css +0 -11
- package/package.json +35 -35
- package/src/buttons/test/edit.native.js +48 -8
- package/src/comment-date/edit.js +8 -2
- package/src/comment-date/index.php +7 -5
- package/src/list-item/edit.native.js +2 -22
- package/src/missing/edit.native.js +44 -12
- package/src/missing/test/__snapshots__/edit.native.js.snap +75 -59
- package/src/navigation/editor.scss +0 -12
- package/src/post-content/block.json +13 -1
- package/src/post-date/edit.js +8 -2
- package/src/post-date/index.php +14 -3
- package/src/pullquote/block.json +13 -0
- package/src/query/edit/inspector-controls/create-new-post-link.js +12 -8
- package/src/query/edit/inspector-controls/index.js +5 -3
- package/src/quote/block.json +13 -0
- package/src/site-logo/index.php +6 -0
- package/src/social-links/test/edit.native.js +41 -5
- package/src/verse/block.json +13 -0
package/src/quote/block.json
CHANGED
|
@@ -29,6 +29,19 @@
|
|
|
29
29
|
"supports": {
|
|
30
30
|
"anchor": true,
|
|
31
31
|
"html": false,
|
|
32
|
+
"background": {
|
|
33
|
+
"backgroundImage": true,
|
|
34
|
+
"backgroundSize": true,
|
|
35
|
+
"__experimentalDefaultControls": {
|
|
36
|
+
"backgroundImage": true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"dimensions": {
|
|
40
|
+
"minHeight": true,
|
|
41
|
+
"__experimentalDefaultControls": {
|
|
42
|
+
"minHeight": false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
32
45
|
"__experimentalOnEnter": true,
|
|
33
46
|
"__experimentalOnMerge": true,
|
|
34
47
|
"typography": {
|
package/src/site-logo/index.php
CHANGED
|
@@ -159,6 +159,8 @@ add_filter( 'pre_set_theme_mod_custom_logo', '_sync_custom_logo_to_site_logo' );
|
|
|
159
159
|
*
|
|
160
160
|
* @since 5.8.0
|
|
161
161
|
*
|
|
162
|
+
* @global array $_ignore_site_logo_changes
|
|
163
|
+
*
|
|
162
164
|
* @param array $old_value Previous theme mod settings.
|
|
163
165
|
* @param array $value Updated theme mod settings.
|
|
164
166
|
*/
|
|
@@ -179,6 +181,8 @@ function _delete_site_logo_on_remove_custom_logo( $old_value, $value ) {
|
|
|
179
181
|
* Deletes the site logo when all theme mods are being removed.
|
|
180
182
|
*
|
|
181
183
|
* @since 5.8.0
|
|
184
|
+
*
|
|
185
|
+
* @global array $_ignore_site_logo_changes
|
|
182
186
|
*/
|
|
183
187
|
function _delete_site_logo_on_remove_theme_mods() {
|
|
184
188
|
global $_ignore_site_logo_changes;
|
|
@@ -211,6 +215,8 @@ add_action( 'setup_theme', '_delete_site_logo_on_remove_custom_logo_on_setup_the
|
|
|
211
215
|
* Removes the custom_logo theme-mod when the site_logo option gets deleted.
|
|
212
216
|
*
|
|
213
217
|
* @since 5.9.0
|
|
218
|
+
*
|
|
219
|
+
* @global array $_ignore_site_logo_changes
|
|
214
220
|
*/
|
|
215
221
|
function _delete_custom_logo_on_remove_site_logo() {
|
|
216
222
|
global $_ignore_site_logo_changes;
|
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
initializeEditor,
|
|
10
10
|
within,
|
|
11
11
|
getBlock,
|
|
12
|
+
screen,
|
|
13
|
+
triggerBlockListLayout,
|
|
12
14
|
waitFor,
|
|
13
15
|
waitForModalVisible,
|
|
14
16
|
} from 'test/helpers';
|
|
@@ -33,7 +35,7 @@ afterAll( () => {
|
|
|
33
35
|
|
|
34
36
|
describe( 'Social links block', () => {
|
|
35
37
|
it( 'inserts block with the default icons and the WordPress link set as active', async () => {
|
|
36
|
-
|
|
38
|
+
await initializeEditor();
|
|
37
39
|
|
|
38
40
|
// Add block
|
|
39
41
|
await addBlock( screen, 'Social Icons' );
|
|
@@ -65,7 +67,7 @@ describe( 'Social links block', () => {
|
|
|
65
67
|
} );
|
|
66
68
|
|
|
67
69
|
it( 'shows active links correctly when not selected', async () => {
|
|
68
|
-
|
|
70
|
+
await initializeEditor();
|
|
69
71
|
|
|
70
72
|
// Add Social Icons block
|
|
71
73
|
await addBlock( screen, 'Social Icons' );
|
|
@@ -105,7 +107,7 @@ describe( 'Social links block', () => {
|
|
|
105
107
|
} );
|
|
106
108
|
|
|
107
109
|
it( 'shows the social links bottom sheet when tapping on the inline appender', async () => {
|
|
108
|
-
|
|
110
|
+
await initializeEditor();
|
|
109
111
|
|
|
110
112
|
// Add block
|
|
111
113
|
await addBlock( screen, 'Social Icons' );
|
|
@@ -154,8 +156,42 @@ describe( 'Social links block', () => {
|
|
|
154
156
|
expect( getEditorHtml() ).toMatchSnapshot();
|
|
155
157
|
} );
|
|
156
158
|
|
|
159
|
+
it( 'shows only the social link blocks when tapping on the inline appender', async () => {
|
|
160
|
+
await initializeEditor();
|
|
161
|
+
|
|
162
|
+
// Add block
|
|
163
|
+
await addBlock( screen, 'Social Icons' );
|
|
164
|
+
|
|
165
|
+
// Get block
|
|
166
|
+
const socialLinksBlock = await getBlock( screen, 'Social Icons' );
|
|
167
|
+
fireEvent.press( socialLinksBlock );
|
|
168
|
+
await triggerBlockListLayout( socialLinksBlock );
|
|
169
|
+
|
|
170
|
+
// Open the links bottom sheet
|
|
171
|
+
const appenderButton =
|
|
172
|
+
within( socialLinksBlock ).getByTestId( 'appender-button' );
|
|
173
|
+
fireEvent.press( appenderButton );
|
|
174
|
+
|
|
175
|
+
// Find a social link in the inserter
|
|
176
|
+
const inserterList = screen.getByTestId( 'InserterUI-Blocks' );
|
|
177
|
+
|
|
178
|
+
// onScroll event used to force the FlatList to render all items
|
|
179
|
+
fireEvent.scroll( inserterList, {
|
|
180
|
+
nativeEvent: {
|
|
181
|
+
contentOffset: { y: 0, x: 0 },
|
|
182
|
+
contentSize: { width: 100, height: 100 },
|
|
183
|
+
layoutMeasurement: { width: 100, height: 100 },
|
|
184
|
+
},
|
|
185
|
+
} );
|
|
186
|
+
|
|
187
|
+
// Check the Paragraph core block is not in the list
|
|
188
|
+
expect(
|
|
189
|
+
within( inserterList ).queryByLabelText( 'Paragraph block' )
|
|
190
|
+
).toBeNull();
|
|
191
|
+
} );
|
|
192
|
+
|
|
157
193
|
it( 'shows the ghost placeholder when no icon is active', async () => {
|
|
158
|
-
|
|
194
|
+
await initializeEditor();
|
|
159
195
|
const { getByLabelText } = screen;
|
|
160
196
|
|
|
161
197
|
// Add block
|
|
@@ -201,7 +237,7 @@ describe( 'Social links block', () => {
|
|
|
201
237
|
} );
|
|
202
238
|
|
|
203
239
|
it( "should set a icon's URL", async () => {
|
|
204
|
-
|
|
240
|
+
await initializeEditor();
|
|
205
241
|
await addBlock( screen, 'Social Icons' );
|
|
206
242
|
fireEvent.press( screen.getByLabelText( 'Facebook social icon' ) );
|
|
207
243
|
fireEvent.press( screen.getByLabelText( 'Add link to Facebook' ) );
|
package/src/verse/block.json
CHANGED
|
@@ -21,6 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
"supports": {
|
|
23
23
|
"anchor": true,
|
|
24
|
+
"background": {
|
|
25
|
+
"backgroundImage": true,
|
|
26
|
+
"backgroundSize": true,
|
|
27
|
+
"__experimentalDefaultControls": {
|
|
28
|
+
"backgroundImage": true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
24
31
|
"color": {
|
|
25
32
|
"gradients": true,
|
|
26
33
|
"link": true,
|
|
@@ -29,6 +36,12 @@
|
|
|
29
36
|
"text": true
|
|
30
37
|
}
|
|
31
38
|
},
|
|
39
|
+
"dimensions": {
|
|
40
|
+
"minHeight": true,
|
|
41
|
+
"__experimentalDefaultControls": {
|
|
42
|
+
"minHeight": false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
32
45
|
"typography": {
|
|
33
46
|
"fontSize": true,
|
|
34
47
|
"__experimentalFontFamily": true,
|