Automattic / Automattic/wp-calypso
Slideshow and Carousel Blocks - Incorrect Number of Items Displayed
- Dominant language
- TypeScript
- Stars
- 12.6k
- Forks
- 2k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 552
Description
### Quick summary
When editing the number of items in a Slideshow Block or Coblocks Carousel Block, the number of items in the media library or the slideshow/carousel will be displayed incorrectly before updating the gallery
This bug is a display error only. It doesn't adversely affect the use of the blocks.
https://user-images.githubusercontent.com/12906034/209423443-7a45836e-3e61-43e9-b761-13392ae959a5.mp4
### Steps to reproduce
1. Insert a Slideshow or Carousel Block.
2. Edit the Slideshow or Carousel to add some images.
3. Select an image to add, then select Add to Gallery.
### What you expected to happen
It will display "showing X of Y media items" where X is the number of images that are selected, and Y is the number of images that used to be in the gallery.
### What actually happened
It should display "showing X of X media items"
### Context
Discovered during unrelated testing of Carousel and Slideshow Blocks.
### Platform (Simple, Atomic, or both?)
Simple, Atomic
### Theme-specific issue?
_No response_
### Browser, operating system and other notes
_No response_
### Reproducibility
Consistent
### Severity
All
### Available workarounds?
No but the platform is still usable
### Workaround details
_No response_
Contributor guide
Research direction
Reproduce the issue in the Slideshow and Coblocks Carousel block editors, then trace where the media-library count is displayed after selecting Add to Gallery. Done means both blocks show the selected-item count as X of X before the gallery is updated, without changing the platform's existing usability.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100