Skip to content

Commit 4d5f668

Browse files
Polish concurrent sideload PR
- Add CHANGELOG entry for concurrent sideload behavior change - Remove pauseItem from ActionCreators type (no thunk calls it) - Simplify first concurrent sideload test to use fake parentId like the other tests in the same describe block
1 parent 7c35c7e commit 4d5f668

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

packages/upload-media/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Enhancement
6+
7+
- Remove sideload upload serialization: thumbnail uploads now run concurrently, governed by `maxConcurrentUploads` instead of being queued one-at-a-time per attachment ([#75257](https://github.com/WordPress/gutenberg/pull/75257)).
8+
59
## 0.26.0 (2026-03-04)
610

711
## 0.25.0 (2026-02-18)

packages/upload-media/src/store/private-actions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ type ActionCreators = {
6161
addItem: typeof addItem;
6262
addSideloadItem: typeof addSideloadItem;
6363
removeItem: typeof removeItem;
64-
pauseItem: typeof pauseItem;
6564
prepareItem: typeof prepareItem;
6665
processItem: typeof processItem;
6766
finishOperation: typeof finishOperation;

packages/upload-media/src/store/test/actions.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -343,24 +343,19 @@ describe( 'actions', () => {
343343
mediaSideload: jest.fn(),
344344
} );
345345

346-
// Add a parent item first.
347-
unlock( registry.dispatch( uploadStore ) ).addItem( {
348-
file: jpegFile,
349-
} );
350-
const parentItem = unlock(
351-
registry.select( uploadStore )
352-
).getAllItems()[ 0 ];
346+
// Use a fake parentId so we only test sideload scheduling.
347+
const fakeParentId = 'fake-parent-id';
353348

354349
// Add two sideload items targeting the same post.
355350
unlock( registry.dispatch( uploadStore ) ).addSideloadItem( {
356351
file: jpegFile,
357-
parentId: parentItem.id,
352+
parentId: fakeParentId,
358353
additionalData: { post: 100, image_size: 'thumbnail' },
359354
operations: [ OperationType.Upload ],
360355
} );
361356
unlock( registry.dispatch( uploadStore ) ).addSideloadItem( {
362357
file: jpegFile,
363-
parentId: parentItem.id,
358+
parentId: fakeParentId,
364359
additionalData: { post: 100, image_size: 'medium' },
365360
operations: [ OperationType.Upload ],
366361
} );
@@ -372,7 +367,7 @@ describe( 'actions', () => {
372367
registry.select( uploadStore )
373368
).getAllItems();
374369
const sideloadItems = items.filter(
375-
( item ) => item.parentId === parentItem.id
370+
( item ) => item.parentId === fakeParentId
376371
);
377372

378373
// Neither sideload item should be paused.

0 commit comments

Comments
 (0)