Skip to content

Commit 4e46483

Browse files
authored
Block: minor bug fixes for WP 6.8 (#14066)
* Block: use stable array to avoid re-renders * Add some missing `__next40pxDefaultSize` attrs * Update patch file
1 parent ecaf0f2 commit 4e46483

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

packages/stories-block/src/block/block-types/single-story/embedControls.js

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ const EmbedControls = (props) => {
118118
value={title || ''}
119119
onChange={(value) => setAttributes({ title: value })}
120120
__nextHasNoMarginBottom
121+
__next40pxDefaultSize
121122
/>
122123
</BaseControl>
123124
</PanelRow>
@@ -188,6 +189,7 @@ const EmbedControls = (props) => {
188189
setAttributes({ width: Number.parseInt(value) })
189190
}
190191
__nextHasNoMarginBottom
192+
__next40pxDefaultSize
191193
/>
192194
<TextControl
193195
type="number"
@@ -202,6 +204,7 @@ const EmbedControls = (props) => {
202204
})
203205
}
204206
__nextHasNoMarginBottom
207+
__next40pxDefaultSize
205208
/>
206209
</div>
207210
</BaseControl>

packages/stories-block/src/block/block-types/single-story/embedControlsInLoop.js

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const EmbedControlsInLoop = (props) => {
7272
setAttributes({ width: Number.parseInt(value) })
7373
}
7474
__nextHasNoMarginBottom
75+
__next40pxDefaultSize
7576
/>
7677
<TextControl
7778
type="number"
@@ -86,6 +87,7 @@ const EmbedControlsInLoop = (props) => {
8687
})
8788
}
8889
__nextHasNoMarginBottom
90+
__next40pxDefaultSize
8991
/>
9092
</div>
9193
</BaseControl>

packages/stories-block/src/block/components/storiesInspectorControls.js

+1
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ const StoriesInspectorControls = (props) => {
210210
}
211211
className="web-stories-settings-archive-link"
212212
__nextHasNoMarginBottom
213+
__next40pxDefaultSize
213214
/>
214215
)}
215216
</PanelBody>

packages/stories-block/src/block/components/storyPicker/selectStories.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,11 @@ KeywordSearch.propTypes = {
122122
onChange: PropTypes.func,
123123
};
124124

125+
const STABLE_ARRAY = [];
126+
125127
function SelectStories({
126-
stories = [],
127-
selectedStories = [],
128+
stories = STABLE_ARRAY,
129+
selectedStories = STABLE_ARRAY,
128130
setSelectedStories,
129131
hasAllStories,
130132
isLoading,
@@ -150,7 +152,7 @@ function SelectStories({
150152
};
151153
return {
152154
// Only load users when capability has been fetched already.
153-
authors: capabilities ? getUsers(query) : [],
155+
authors: capabilities ? getUsers(query) : STABLE_ARRAY,
154156
};
155157
},
156158
[authorKeyword]

patches/@types+glider-js+1.7.11.patch renamed to patches/@types+glider-js+1.7.12.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/@types/glider-js/index.d.ts b/node_modules/@types/glider-js/index.d.ts
2-
index 35a953d..655ded6 100644
2+
index 2be4c56..1b838c6 100644
33
--- a/node_modules/@types/glider-js/index.d.ts
44
+++ b/node_modules/@types/glider-js/index.d.ts
55
@@ -97,7 +97,7 @@ declare namespace Glider {
@@ -11,7 +11,7 @@ index 35a953d..655ded6 100644
1111

1212
/**
1313
* This prevents resizing items to fit when `slidesToShow` is set to
14-
@@ -242,13 +242,13 @@ declare class Glider<T extends HTMLElement = HTMLDivElement> {
14+
@@ -247,13 +247,13 @@ declare class Glider<T extends HTMLElement = HTMLDivElement> {
1515
* @param slideIndexs string | number
1616
* @param isActuallyDotIndex boolean
1717
*/
@@ -27,7 +27,7 @@ index 35a953d..655ded6 100644
2727

2828
/**
2929
* Overrides options set during initialization. If called when a
30-
@@ -271,6 +271,10 @@ declare class Glider<T extends HTMLElement = HTMLDivElement> {
30+
@@ -276,6 +276,10 @@ declare class Glider<T extends HTMLElement = HTMLDivElement> {
3131
resize(): void;
3232

3333
init(): void;

0 commit comments

Comments
 (0)