Number of blocks selected (when using container blocks) is inaccurate or misleading #56068
Labels
[Feature] Block Multi Selection
The ability to select and manipulate multiple blocks
[Type] Bug
An existing feature does not function as intended
Description
When performing a multi-selection, the number of blocks that are selected are announced or flagged in the UI based on the number of blocks at the current level of the hierarchy. The calculation does not include all child blocks that are part of that selection.
For example, if you have a post containing a Group and a Paragraph block at the root of a document, and then go to add a number of child blocks to the Group block, and select all blocks, then the UI will think that only two blocks are selected.
Question ❓
What is the desired behaviour here? I assume it would be for the reported number of blocks selected to contain all children blocks? It might be tricky to do accurately as a selection can include synced patterns or template parts which might not be resolved or available within the current context.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
The following screenshot demonstrates all blocks in a document being selected (A Group containing many paragraphs, and another paragraph block at the root of the document). In this example, the user might expect the number of blocks selected to be reported as 18 in total (including all child blocks), however it is reported that only 2 blocks are selected.
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: