Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number of blocks selected (when using container blocks) is inaccurate or misleading #56068

Open
andrewserong opened this issue Nov 13, 2023 · 0 comments
Labels
[Feature] Block Multi Selection The ability to select and manipulate multiple blocks [Type] Bug An existing feature does not function as intended

Comments

@andrewserong
Copy link
Contributor

andrewserong commented Nov 13, 2023

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

  1. Add a Group and a Paragraph block to the root of a document
  2. Add some blocks to the Group block
  3. Select all blocks in the document
  4. Notice that the UI or announcements will communicate that only 2 blocks are selected

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.

image

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

@andrewserong andrewserong added [Type] Bug An existing feature does not function as intended [Feature] Block Multi Selection The ability to select and manipulate multiple blocks labels Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Multi Selection The ability to select and manipulate multiple blocks [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

1 participant